{"id":28967,"date":"2021-08-01T08:08:09","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=28967"},"modified":"2024-05-06T11:44:18","modified_gmt":"2024-05-06T02:44:18","slug":"28967","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/28967","title":{"rendered":"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f! \u30d5\u30ea\u30fc\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u9577\u702c\u3067\u3059\u3002<\/p>\n<p>\u307f\u306a\u3055\u3093\u306f<span style=\"color: #339966;\"><strong>ajax(\u30a8\u30a4\u30b8\u30e3\u30c3\u30af\u30b9)<\/strong><\/span>\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u304b\uff1f<\/p>\n<p>ajax(\u30a8\u30a4\u30b8\u30e3\u30c3\u30af\u30b9)\u3063\u3066\u306a\u3093\u3060\u304b\u96e3\u3057\u305d\u3046\u3060\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u9806\u3092\u8ffd\u3063\u3066<span style=\"color: #0000ff;\"><strong>\u521d\u5fc3\u8005\u306b\u308f\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b<\/strong><\/span>\u8aac\u660e\u3059\u308b\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><span style=\"color: #339966;\"><strong>ajax<\/strong><\/span>\u3092\u4f7f\u3048\u3070\u3001\u52d5\u7684\u306b\u30da\u30fc\u30b8\u5185\u5bb9\u3092\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3046\u307e\u304f\u4f7f\u3044\u3053\u306a\u305b\u3070<span style=\"color: #0000ff;\"><strong>\u30e6\u30fc\u30b6\u30fc\u3068\u306e\u9023\u643a\u304c\u3088\u308a\u5f37\u3044<\/strong><\/span>\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001ajax\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u30fb ajax\u3068\u306f<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>\u30fb ajax\u3092\u4f7f\u3063\u3066\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5<\/strong><\/span><\/p>\n<p>\u3068\u3044\u3046\u57fa\u672c\u7684\u306a\u5185\u5bb9\u304b\u3089\u3001<\/p>\n<p><span style=\"color: #ff0000;\"><strong> \u30fbajax\u3092\u4f7f\u3063\u305f\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5<\/strong><\/span><\/p>\n<p>\u3068\u3044\u3063\u305f\u5b9f\u8df5\u7684\u306a\u5185\u5bb9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>ajax\u3068\u306f<\/h2>\n<p><span style=\"color: #339966;\"><strong>ajax<\/strong><\/span>\u306fAsynchronous Javascript and XML\u306e\u7565\u3067\u3001\u30a6\u30a7\u30d6\u958b\u767a\u306b\u304a\u3044\u3066\u4f7f\u7528\u3055\u308c\u308b\u3044\u304f\u3064\u304b\u306e\u6280\u8853\u306e\u7dcf\u79f0\u3067\u3059\u3002<\/p>\n<p>ajax\u306b\u304a\u3044\u3066\u4f7f\u7528\u3055\u308c\u308b\u6280\u8853\u3092\u4f7f\u3048\u3070\u3001<span style=\"color: #ff0000; background-color: #ffff99;\"><strong>\u30da\u30fc\u30b8\u3092\u66f4\u65b0\u3059\u308b\u3053\u3068\u306a\u304f\u30da\u30fc\u30b8\u306e\u5185\u5bb9\u3060\u3051\u3092\u5165\u308c\u66ff\u3048\u3089\u308c\u308b\u306e\u3067\u3001<\/strong><\/span>\u4f7f\u3044\u65b9\u306b\u3088\u3063\u3066\u306f\u3088\u308a\u5feb\u9069\u306a\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u52d5\u7684\u306b\u30da\u30fc\u30b8\u3092\u90e8\u5206\u7684\u306b\u66f4\u65b0\u3067\u304d\u308b\u306e\u3067\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306a\u3069\u306b\u3088\u308a\u8fd1\u3044\u8868\u73fe\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001ajax\u306e\u4e2d\u6838\u3092\u652f\u3048\u3066\u3044\u308b\u306e\u306f<span style=\"color: #0000ff;\"><strong>Javacript\u306e\u6280\u8853<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #339966;\"><strong>XMLHttpRequest<\/strong><\/span>\u3068\u547c\u3070\u308c\u308b\u6280\u8853\u3092\u4f7f\u3046\u3053\u3068\u306b\u3088\u3063\u3066\u3001HttpRequest\u3092\u52d5\u7684\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u9001\u308b\u3053\u3068\u304c\u3067\u304d\u3001<span style=\"color: #0000ff;\"><strong>\u4efb\u610f\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u52d5\u7684\u304b\u3064\u975e\u540c\u671f\u306b\u5b9f\u884c<\/strong><\/span>\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u52d5\u7684\u306b<span style=\"color: #339966;\"><strong>DOM(Document Object Model)<\/strong><\/span>\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u3067\uff0c\u90e8\u5206\u7684\u306a\u30da\u30fc\u30b8\u306e\u5909\u66f4(HTML\u3001CSS\u306e\u5909\u66f4)\u3092\u5b9f\u73fe\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001ajax\u306e\u5b9f\u4f53\u306fJavascript\u306b\u3042\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001ajax\u3092\u4f7f\u7528\u3059\u308b\u4e0a\u3067\u306f<span style=\"color: #ff0000;\"><strong>\u3044\u304f\u3064\u304b\u306e\u30c7\u30e1\u30ea\u30c3\u30c8<\/strong><\/span>\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u5b9f\u969b\u306e\u958b\u767a\u3067\u306fajax\u3092\u4f7f\u7528\u3059\u308b\u90e8\u5206\u3068\u3057\u306a\u3044\u90e8\u5206\u3092\u8003\u3048\u308b\u5fc5\u8981\u304c\u3067\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>\u30fb\u30da\u30fc\u30b8\u3092\u66f4\u65b0\u3057\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u306fURL\u304c\u5909\u308f\u3089\u306a\u3044\u306e\u3067\u3001\u5909\u5316\u5f8c\u306e\u60c5\u5831\u306b<span style=\"color: #ff0000;\"><strong>\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3002<\/strong><\/span>(\u5909\u5316\u5f8c\u306e\u30da\u30fc\u30b8\u5185\u5bb9\u3092\u76f4\u63a5\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3067\u304d\u306a\u3044)<\/p>\n<p>\u30fb\u5909\u66f4\u5f8c\u306b\u8868\u793a\u3055\u308c\u305f\u6587\u7ae0\u306f\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u306b\u306f\u5f15\u3063\u304b\u304b\u3089\u306a\u3044\u306e\u3067\u3001<span style=\"color: #ff0000;\"><strong>SEO\u306e\u554f\u984c<\/strong><\/span>\u304c\u3042\u308b\u3002<\/p>\n<p>\u30fb\u3059\u3079\u3066\u306e\u30d6\u30e9\u30a6\u30b6\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3002<\/p>\n<p>\u30fb\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u3084\u30d7\u30e9\u30a4\u30d0\u30fc\u30b7\u306e\u554f\u984c\u306e\u3059\u3079\u3066\u304c\u89e3\u6c7a\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3002<\/p>\n<p>\u306a\u3069\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u308c\u3089\u306e\u30c7\u30e1\u30ea\u30c3\u30c8\u3092\u8003\u3048\u305f\u4e0a\u3067\u3082ajax\u306b\u306f\u305d\u308c\u3092\u6253\u3061\u6d88\u3059\u304f\u3089\u3044\u306e\u9b45\u529b\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6700\u8fd1\u3067\u306f<span style=\"color: #339966;\"><strong>SPA(Single Page Application)<\/strong><\/span>\u304c\u6d41\u884c\u3057\u3066\u3044\u3066\u3001\u305d\u306e\u4e2d\u6838\u3092\u306a\u3057\u3066\u3044\u308b\u306e\u304cajax\u3092\u4f7f\u3063\u305f\u975e\u540c\u671f\u3067\u306e\u30da\u30fc\u30b8\u306e\u66f4\u65b0\u3067\u3059\u3002<\/p>\n<p>SPA\u3068\u306f\u30b7\u30f3\u30b0\u30eb\u30da\u30fc\u30b8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7565\u3067\u3001\u540d\u524d\u306e\u3068\u304a\u308aajax\u3092\u591a\u7528\u3059\u308b\u3053\u3068\u3067\u30da\u30fc\u30b8\u9077\u79fb\u306b\u983c\u3089\u306a\u3044\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5f62\u5f0f\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>SPA\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f<span style=\"color: #339966;\"><strong>Backbone<\/strong><\/span>\u3001<span style=\"color: #339966;\"><strong>Angular<\/strong><\/span>\u3001<span style=\"color: #339966;\"><strong>Ember<\/strong><\/span>\u3001<span style=\"color: #339966;\"><strong>Riot<\/strong><\/span>\u3001<span style=\"color: #339966;\"><strong>Vue<\/strong><\/span>\u3001<span style=\"color: #339966;\"><strong>React<\/strong><\/span>\u3001<span style=\"color: #339966;\"><strong>Knockout<\/strong><\/span>\u306a\u3069\u304c\u3042\u308a\u3001\u6570\u591a\u304f\u958b\u767a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Rails\u3067\u30825.1\u304b\u3089\u306fjQuery\u4f9d\u5b58\u304c\u89e3\u6d88\u3055\u308c\u305f\u308a\u3068\u3001\u3053\u308c\u3089\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092Rails\u3067\u4f7f\u7528\u3059\u308b\u5834\u9762\u304c\u3053\u308c\u304b\u3089\u5897\u3048\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3067<span style=\"color: #0000ff;\"><strong>\u3057\u3063\u304b\u308a\u3068ajax\u306e\u57fa\u672c\u7684\u306a\u6d41\u308c\u3068\u6982\u5ff5<\/strong><\/span>\u3092\u7406\u89e3\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>ajax\u3092\u4f7f\u3063\u3066\u52d5\u7684\u306b\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5<\/h2>\n<p>\u305d\u308c\u3067\u306f\u3001\u307e\u305a\u306fajax(\u30a8\u30a4\u30b8\u30e3\u30c3\u30af\u30b9)\u306e\u5c0e\u5165\u3068\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u5165\u529b\u3057\u305f\u5024\u3092\u7528\u3044\u3066\u30bf\u30a4\u30c8\u30eb\u3092\u52d5\u7684\u306b\u5909\u66f4\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5b9f\u884c\u74b0\u5883\u306eRails\u306e<span style=\"color: #0000ff;\"><strong>\u30d0\u30fc\u30b8\u30e7\u30f3\u306f5.0.5<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u4f7f\u7528\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[Practice\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3068index\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b]<\/p>\n<pre class=\"lang:ruby decode:true \" >rails g controller Practice index <\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \" >    create  app\/controllers\/practice_controller.rb\r\n       route  get 'practice\/index'\r\n      invoke  erb\r\n      create    app\/views\/practice\r\n      create    app\/views\/practice\/index.html.erb\r\n      invoke  test_unit\r\n      create    test\/controllers\/practice_controller_test.rb\r\n      invoke  helper\r\n      create    app\/helpers\/practice_helper.rb\r\n      invoke    test_unit\r\n      invoke  assets\r\n      invoke    coffee\r\n      create      app\/assets\/javascripts\/practice.coffee\r\n      invoke    scss\r\n      create      app\/assets\/stylesheets\/practice.scss<\/pre>\n<p>\u3053\u308c\u3067\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u307e\u305a\u306fView\u3092\u6574\u3048\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4f5c\u6210\u3057\u305fapp\/views\/practice\/index.html.erb\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/views\/practice\/index.html.erb\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >&lt;h1&gt;Ajax\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046&lt;\/h1&gt;\r\n&lt;%= form_tag(url_for(:action =&gt; 'index'), :remote =&gt; true) do %&gt;\r\n  &lt;%= text_field_tag :title %&gt;\r\n  &lt;%= submit_tag &quot;\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u66f4\u3059\u308b&quot; %&gt;\r\n&lt;% end %&gt;<\/pre>\n<p>\u3053\u308c\u3067\u3001View\u3092\u4f5c\u6210\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u3067\u5927\u5207\u306a\u306e\u306f\u3001<span style=\"color: #339966;\"><strong>:remote => true<\/strong><\/span>\u306e\u90e8\u5206\u3067\u3059\u3002\u3053\u3046\u8a18\u8ff0\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066<span style=\"color: #339966;\"><strong>turbolink<\/strong><\/span>\u3092\u6709\u52b9\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Rails\u3067\u306fturbolink\u3092\u4f7f\u3048\u3070\u3001<span style=\"color: #0000ff;\"><strong>ajax\u304c\u81ea\u52d5\u7684\u306b\u4f7f\u3048\u308b<\/strong><\/span>\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u304cRails\u3067ajax\u5b9f\u88c5\u306e\u30b3\u30b9\u30c8\u304c\u4f4e\u3044\u3068\u8a00\u308f\u308c\u308b\u7406\u7531\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306fPractice\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u5185\u5bb9\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f5c\u6210\u3057\u305fapp\/controllers\/practice_controller.rb\u306eindex\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/controllers\/practice_controller.rb\u306eindex\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >  def index\r\n    @title = params[:title]\r\n    respond_to do |format|\r\n      format.html\r\n      format.js\r\n    end\r\n  end<\/pre>\n<p>index\u3067\u30dd\u30b9\u30c8\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092params[:title]\u3067\u53d7\u3051\u53d6\u3063\u305f\u5f8c\u3001<span style=\"color: #339966;\"><strong>respond_to<\/strong><\/span>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u7d50\u679c\u3092\u3069\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u8fd4\u3059\u304b\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>turbolink\u304c\u6709\u52b9\u3067\u306a\u3044\u3068\u304d\u306fformat.html\u306b\u306a\u308a\u3001\u6709\u52b9\u306a\u6642\u306fformat.js\u304c\u9078\u3070\u308c\u307e\u3059\u3002<\/p>\n<p>format.js\u304c\u9078\u3070\u308c\u308b\u3068\u3001\u6b21\u306b\u5b9f\u884c\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u306findex.js.erb\u3067\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306bJavascript(jQuery\u3084Coffeescript\u7b49)\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u52d5\u7684\u306bDOM\u3092\u64cd\u4f5c\u3067\u304d\u307e\u3059\u3002(HTML\u3001CSS\u306e\u5909\u66f4) <\/p>\n<p>\u307e\u305findex\u306b\u30dd\u30b9\u30c8\u3057\u3066\u3044\u308b\u306e\u3067\u3001app\/config\/routes.rb\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30ea\u30bd\u30fc\u30b9\u3092\u632f\u308a\u5206\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/config\/routes.rb\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >  get 'practice\/index'\r\n  post 'practice\/index'<\/pre>\n<p>post \u2018practice\/index\u2019\u4ee5\u5916\u306frails g controller\u306e\u969b\u306b\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u6b21\u306fformat.js\u3067\u6307\u5b9a\u3057\u305findex.js.erb\u3092app\/views\/practice\/\u306b\u4f5c\u6210\u3057\u3066\u5185\u5bb9\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/views\/practice\/index.js.erb]<\/p>\n<pre class=\"lang:ruby decode:true \" >$('h1').html(&quot;&lt;%= @title %&gt;&quot;);<\/pre>\n<p>h1\u306e\u8981\u7d20\u3092\u6307\u5b9a\u3057\u3066\u3001\u5185\u5bb9\u3092\u30c6\u30ad\u30b9\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u5165\u529b\u3055\u308c\u305f\u5024\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306fajax\u306e\u6e96\u5099\u304c\u6574\u3063\u305f\u306e\u3067\u5b9f\u969b\u306b\u975e\u540c\u671f\u304b\u3064\u52d5\u7684\u306b\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u66f4\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306brails s\u3068\u5165\u529b\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4ee5\u4e0b\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001app\/views\/practice\/index.html.erb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>http:\/\/localhost:3000\/practice\/index<\/p>\n<p>(\u88dc\u8db3http:\/\/localhost:3000\u306e\u7b87\u6240\u306f\u5404\u81ea\u306e\u958b\u767a\u74b0\u5883\u306b\u3088\u308a\u8aad\u307f\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.46.30.png\" alt=\"Screen Shot 2560-08-07 at 11.46.30\" width=\"980\" height=\"358\" class=\"alignnone size-full wp-image-28968\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.46.30.png 980w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.46.30-150x55.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.46.30-300x110.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.46.30-640x234.png 640w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.46.30-810x296.png 810w\" sizes=\"(max-width: 980px) 100vw, 980px\" \/><\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u5024\u3092\u6253\u3061\u8fbc\u3093\u3067\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u66f4\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.50.47.png\" alt=\"Screen Shot 2560-08-07 at 11.50.47\" width=\"996\" height=\"396\" class=\"alignnone size-full wp-image-28969\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.50.47.png 996w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.50.47-150x60.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.50.47-300x119.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.50.47-640x254.png 640w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-11.50.47-810x322.png 810w\" sizes=\"(max-width: 996px) 100vw, 996px\" \/><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u52d5\u7684\u306bDOM\u3092\u64cd\u4f5c\u3057\u3066\u3001HTML\u3092\u5909\u66f4\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001URL\u304c\u672c\u5f53\u306b\u5909\u308f\u3063\u3066\u3044\u306a\u3044\u304b\u78ba\u304b\u3081\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Rails\u306b\u304a\u3051\u308b<span style=\"color: #0000ff;\"><strong>ajax\u306e\u6d41\u308c\u3092\u78ba\u8a8d<\/strong><\/span>\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>1.<span style=\"color: #339966;\"><strong>turbolink<\/strong><\/span>\u307e\u305f\u306f<span style=\"color: #339966;\"><strong>jQuery<\/strong><\/span>\u306a\u3069\u3092\u4f7f\u3063\u3066\u3001Javascript\u3067XMLHttpRequest\u3092\u9001\u308a\u4efb\u610f\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b(\u4eca\u56de\u306findex\u30a2\u30af\u30b7\u30e7\u30f3)<\/p>\n<p>2.\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u5b9f\u884c\u3055\u308c\u308b(\u3053\u306e\u9593\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u3084\u308a\u3068\u308a\u304c\u3067\u304d\u308b)\u3002\u307e\u305f\u3001\u3069\u306e\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u8fd4\u5374\u3059\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002(Javacript\u3001JSON\u3001XML\u306a\u3069) <\/p>\n<p>3.\u9078\u629e\u3055\u308c\u305f\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067(\u4eca\u56de\u306fJavascript)<span style=\"color: #0000ff;\"><strong>\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u7684\u306b\u691c\u7d22<\/strong><\/span>\u3057\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u3092\u5b9f\u884c\u3059\u308b(\u4eca\u56de\u306findex.js.erb)\u3053\u3053\u3067\u3001HTML&amp;CSS\u304c\u5909\u66f4\u3055\u308c\u3066\u3001ajax\u304c\u5b8c\u7d50\u3059\u308b\u3002<\/p>\n<p><span style=\"color: #339966;\"><strong>index.js.erb<\/strong><\/span>\u306a\u3069\u3084\u3084<span style=\"color: #ff0000;\"><strong>\u305f\u304f\u3055\u3093\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3072\u3068\u3064\u3072\u3068\u3064\u306e\u5f79\u5272\u3092\u982d\u306b\u5165\u308c\u3066\u3092\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u9806\u756a\u3092\u8ffd\u3063\u3066\u7406\u89e3\u3059\u308c\u3070\u3001\u305d\u3046\u96e3\u3057\u3044\u3082\u306e\u3067\u306f\u306a\u3044\u306e\u3067\u3001<span style=\"color: #0000ff;\"><strong>ajax\u3092\u4f7f\u3046\u3068\u304d\u306f\u3053\u306e\u6d41\u308c\u3092\u3057\u3063\u304b\u308a\u3068\u30a4\u30e1\u30fc\u30b8<\/strong><\/span>\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>ajax\u3092\u4f7f\u3063\u305f\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5<\/h2>\n<p>\u7d9a\u3044\u3066\u306f\u3088\u308a\u5b9f\u8df5\u7684\u306a\u5185\u5bb9\u3067\u3059\u3002<br \/>\najax\u3092\u4f7f\u3063\u305f<span style=\"color: #0000ff;\"><strong>\u52d5\u7684\u306a\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u6210<\/strong><\/span>\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4eca\u56de\u5b9f\u88c5\u3059\u308b\u3053\u3068\u306f<\/p>\n<p>\u30fb\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u30dd\u30b9\u30c8\u7528\u306e\u30d5\u30a9\u30fc\u30e0\u304c\u73fe\u308c\u308b\u3002<br \/>\n\u30fb\u5024\u3092\u5165\u529b\u3057\u3001\u9001\u4fe1\u3059\u308b\u3068\u52d5\u7684\u306b\u30c7\u30fc\u30bf\u304c\u66f4\u65b0\u3055\u308c\u308b\u3002<br \/>\n\u30fb\u30dd\u30b9\u30c8\u7528\u306e\u30d5\u30a9\u30fc\u30e0\u306f\u6d88\u3048\u308b\u3002<\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u307e\u305a\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306bModel\u3092\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3057\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3059\u308b]<\/p>\n<pre class=\"lang:ruby decode:true \" >rails g model Apple name:string\r\nrake db:migrate<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \" >      invoke  active_record\r\n      create    db\/migrate\/20170807063503_create_apples.rb\r\n      create    app\/models\/apple.rb\r\n      invoke    test_unit\r\n      create      test\/models\/apple_test.rb\r\n      create      test\/fixtures\/apples.yml\r\n\r\n== 20170807063503 CreateApples: migrating =====================================\r\n-- create_table(:apples)\r\n   -&gt; 0.0052s\r\n== 20170807063503 CreateApples: migrated (0.0053s) ============================<\/pre>\n<p>name\u306e\u30ab\u30e9\u30e0\u3092\u6301\u3063\u305fApple\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306b\u6210\u529f\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3059\u3002\u30b3\u30f3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"lang:ruby decode:true \" >rails g controller apples<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \" >      create  app\/controllers\/apples_controller.rb\r\n      invoke  erb\r\n      create    app\/views\/apples\r\n      invoke  test_unit\r\n      create    test\/controllers\/apples_controller_test.rb\r\n      invoke  helper\r\n      create    app\/helpers\/apples_helper.rb\r\n      invoke    test_unit\r\n      invoke  assets\r\n      invoke    coffee\r\n      create      app\/assets\/javascripts\/apples.coffee\r\n      invoke    scss\r\n      create      app\/assets\/stylesheets\/apples.scss<\/pre>\n<p>\u3053\u308c\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306f\u30ea\u30bd\u30fc\u30b9\u3092\u632f\u308a\u5206\u3051\u308b\u306e\u3067\u3001app\/config\/routes\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"lang:ruby decode:true \" >resources :apples<\/pre>\n<p>\u3053\u308c\u3067<span style=\"color: #339966;\"><strong>RESTful<\/strong><\/span>\u306a\u30ea\u30bd\u30fc\u30b9\u306e\u632f\u308a\u5206\u3051\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>RESTful\u306a\u30ea\u30bd\u30fc\u30b9\u306e\u632f\u308a\u5206\u3051\u304c\u308f\u304b\u3089\u306a\u3044\u4eba\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/26515\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails-scaffold2-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Rails\u5165\u9580\u3011\u521d\u3081\u3066\u306eWeb\u30a2\u30d7\u30ea\u958b\u767a\u306a\u3089scaffold\u304c\u6700\u77ed\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<p>\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304b\u3089\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\napp\/controller\/apples_controller.rb\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/controller\/apples_controller.rb\u306b\u8ffd\u52a0\u3059\u308b\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >class ApplesController &lt; ApplicationController\r\n\r\n  def index\r\n    @apples = Apple.all\r\n  end\r\n\r\n  def new\r\n    @apples = Apple.new\r\n    respond_to do |format|\r\n      format.html\r\n      format.js\r\n    end\r\n  end\r\n\r\n  def create\r\n    @apples = Apple.all\r\n    @apple = Apple.new(apple_params)\r\n    respond_to do |format|\r\n      if @apple.save\r\n        format.html\r\n        format.js\r\n      else\r\n        format.js {render :new}\r\n      end\r\n    end\r\n  end\r\n\r\n  def apple_params\r\n    params.require(:apple).permit(:name)\r\n  end\r\nend<\/pre>\n<p><span style=\"color: #339966;\"><strong>respond_to<\/strong><\/span>\u306e\u6319\u52d5\u306f\u524d\u7bc0\u3067\u8aac\u660e\u3057\u305f\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u6b21\u306bView\u306e\u4f5c\u6210\u3092\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002app\/views\/apples\/index.html.erb\u3092\u4f5c\u6210\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/views\/apples\/index.html.erb\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >&lt;h1&gt;Apple\u30e2\u30c7\u30eb\u4e00\u89a7&lt;\/h1&gt;\r\n&lt;table class=&quot;table&quot; id=&quot;apples&quot;&gt;\r\n  &lt;%= render @apples %&gt;\r\n&lt;\/table&gt;\r\n&lt;%= link_to &quot;\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b&quot;, new_apple_path, remote: true %&gt;\r\n&lt;div id=&quot;apple-form&quot;&gt;&lt;\/div&gt;<\/pre>\n<p>  <%= render @apples =>\u306e\u90e8\u5206\u3067\u30d1\u30fc\u30b7\u30e3\u30eb\u3092\u5165\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u8a72\u5f53\u3059\u308b\u30d1\u30fc\u30b7\u30e3\u30eb\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>app\/views\/apples\/_apple.html.erb\u3092\u4f5c\u6210\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n(@apples\u306e\u3088\u3046\u306b\u3001\u66f8\u304f\u3068\u81ea\u52d5\u7684\u306b_apple.html.erb\u3092\u691c\u7d22\u3057\u307e\u3059\u3002)<\/p>\n<p>[app\/views\/apples\/_apple.html.erb\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >&lt;tr&gt;\r\n  &lt;td&gt;\r\n    &lt;%= apple.name %&gt;\r\n  &lt;\/td&gt;\r\n&lt;\/tr&gt;<\/pre>\n<p>\u3053\u308c\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u8a2d\u5b9a\u3057\u305f\u5909\u6570\u304b\u3089\u5024\u3092\u51fa\u529b\u3067\u304d\u307e\u3059\u3002<br \/>\n[index\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >  def index\r\n    @apples = Apple.all\r\n  end<\/pre>\n<p>\u307e\u305f\u3001\u524d\u7bc0\u3067\u8aac\u660e\u3057\u305f\u3088\u3046\u306b<span style=\"color: #339966;\"><strong>link_to<\/strong><\/span>\u306bremote:true\u3092\u52a0\u3048\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u81ea\u52d5\u7684\u306bajax\u3067\u306e\u51e6\u7406\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001&quot;\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u201d\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001apples\u306enew\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>[new\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >  def new\r\n    @apples = Apple.new\r\n    respond_to do |format|\r\n      format.html\r\n      format.js\r\n    end\r\n  end<\/pre>\n<p>ajax\u3067\u5b9f\u884c\u3057\u3066\u3044\u308b\u306e\u3067\u3001format.js\u306b\u8a72\u5f53\u3059\u308bnew.js.erb\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001app\/views\/apples\/new.js.erb\u3092\u4f5c\u6210\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/views\/apples\/new.js.erb\u306b\u8ffd\u52a0\u3059\u308b\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >$('#apple-form').html(&quot;&lt;%= j (render 'form') %&gt;&quot;);\r\n$('#apple-form').fadeIn(800);<\/pre>\n<p>\u3053\u308c\u3067&lt;div id=&quot;apple-form&quot;&gt;&lt;\/div&gt;\u306e\u7b87\u6240\u306b\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u304c\u52d5\u7684\u306b\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001render\u3067form\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067\u3001_form.html.erb\u3092\u4f5c\u6210\u3057\u3066\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u7528\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>[app\/views\/apples\/_form.html.erb\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >&lt;%= simple_form_for @apples, remote: true do |f| %&gt;\r\n  &lt;%= f.input :name %&gt;\r\n  &lt;%= f.button :submit ,&quot;\u8ffd\u52a0&quot; %&gt;\r\n&lt;% end %&gt;<\/pre>\n<p>\u3053\u3061\u3089\u306f<span style=\"color: #339966;\"><strong>simpel_form<\/strong><\/span>\u3068\u3044\u3046form\u3092\u7c21\u7d20\u5316\u3057\u3066\u304f\u308c\u308bgem\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u3059\u306e\u3067\u3001Gemfile\u306b<\/p>\n<pre class=\"lang:ruby decode:true \" >gem 'simple_form'<\/pre>\n<p>\u3092\u5165\u529b\u3057\u305f\u5f8c\u3001bundle install\u3092\u3057\u3066gem\u3092\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305f\u3001sime_form\u306e\u521d\u671f\u8a2d\u5b9a\u306e\u305f\u3081\u306b\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"lang:ruby decode:true \" >rails generate simple_form:install<\/pre>\n<p>\u3053\u308c\u3067\u3001simple_form\u304c\u4f7f\u7528\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u3067<\/p>\n<p>\u30fb\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u30dd\u30b9\u30c8\u7528\u306e\u30d5\u30a9\u30fc\u30e0\u304c\u73fe\u308c\u308b\u3002<\/p>\n<p>\u307e\u3067\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b8b\u308a\u306f<\/p>\n<p>\u30fb\u5024\u3092\u5165\u529b\u3057\u3001\u9001\u4fe1\u3059\u308b\u3068\u52d5\u7684\u306b\u30c7\u30fc\u30bf\u304c\u66f4\u65b0\u3055\u308c\u308b\u3002<br \/>\n\u30fb\u30dd\u30b9\u30c8\u7528\u306e\u30d5\u30a9\u30fc\u30e0\u306f\u6d88\u3048\u308b\u3002<\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u5f8c\u306f\u30d5\u30a9\u30fc\u30e0\u306b\u5024\u3092\u5165\u529b\u3057\u3066\u30dd\u30b9\u30c8\u3057\u305f\u5f8c\u306e\u52d5\u4f5c\u3092\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u5024\u304c\u30dd\u30b9\u30c8\u3055\u308c\u308b\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u8a2d\u5b9a\u3057\u305fcreate\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u547c\u3073\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>[create\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >  def create\r\n    @apples = Apple.all\r\n    @apple = Apple.new(apple_params)\r\n    respond_to do |format|\r\n      if @apple.save\r\n        format.html\r\n        format.js\r\n      else\r\n        format.js {render :new}\r\n      end\r\n    end\r\n  end<\/pre>\n<p>\u5024\u3092\u53d7\u3051\u53d6\u3063\u3066\u3001save\u306b\u6210\u529f\u3059\u308c\u3070format.js\u306b\u8a72\u5f53\u3059\u308bcreate.js.erb\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3067\u3059\u306e\u3067\u3001app\/views\/apples\/create.js.erb\u3092\u4f5c\u6210\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/views\/apples\/create.js.erb\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >$('#apples').html(&quot;&lt;%= j (render 'index') %&gt;&quot;);\r\n$('#apple-form').fadeOut(600);<\/pre>\n<p>render \u2018index\u2019\u306e\u90e8\u5206\u3067index\u306e\u30d1\u30fc\u30b7\u30e3\u30eb\u3092\u51fa\u529b\u3057\u3001\u307e\u305f<span style=\"color: #339966;\"><strong>fadeOut<\/strong><\/span>\u3067\u30d5\u30a9\u30fc\u30e0\u3092\u898b\u3048\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u30d1\u30fc\u30b7\u30e3\u30eb\u306e\u5185\u5bb9\u3092\u5165\u529b\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002app\/views\/apples\/_index.html.erb\u3092\u4f5c\u6210\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[app\/views\/apples\/_index.html.erb\u306e\u5185\u5bb9]<\/p>\n<pre class=\"lang:ruby decode:true \" >&lt;%= render @apples %&gt;<\/pre>\n<p>\u3053\u308c\u3067\u3001\u81ea\u52d5\u7684\u306b_apple.html.erb\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u5024\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001ajax\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u9577\u3044\u8a2d\u5b9a\u3067\u3057\u305f\u304c\u3001\u4f5c\u6210\u3057\u305fview\u306f<\/p>\n<p>\u30fb_apple.html.erb<br \/>\n\u30fb_form.html.erb<br \/>\n\u30fb_index.html.erb<br \/>\n\u30fbcreate.js.erb<br \/>\n\u30fbindex.htlm.erb<br \/>\n\u30fbnew.js.erb<\/p>\n<p>\u306e6\u3064\u3067\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u78ba\u8a8d\u3067\u304d\u305f\u3089\u3001\u7d50\u679c\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306brails s\u3068\u5165\u529b\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4ee5\u4e0b\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001index.html.erb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>http:\/\/localhost:3000\/apples<\/p>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.26.20.png\" alt=\"Screen Shot 2560-08-07 at 16.26.20\" width=\"576\" height=\"234\" class=\"alignnone size-full wp-image-28970\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.26.20.png 576w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.26.20-150x61.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.26.20-300x122.png 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.24.png\" alt=\"Screen Shot 2560-08-07 at 16.32.24\" width=\"594\" height=\"312\" class=\"alignnone size-full wp-image-28972\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.24.png 594w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.24-150x79.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.24-300x158.png 300w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.30.png\" alt=\"Screen Shot 2560-08-07 at 16.32.30\" width=\"544\" height=\"276\" class=\"alignnone size-full wp-image-28973\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.30.png 544w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.30-150x76.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/Screen-Shot-2560-08-07-at-16.32.30-300x152.png 300w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001ajax\u3067\u52d5\u7684\u306b\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3044\u304b\u304c\u3067\u3057\u305f\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001ajax\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f<\/p>\n<p><span style=\"color: #339966;\"><strong>ajax<\/strong><\/span>\u306fJavascript\u306b\u3088\u3063\u3066\u5b9f\u73fe\u3057\u3066\u3044\u308b\u6280\u8853\u3060\u3068\u3044\u3046\u3053\u3068\u304c\u304a\u5206\u304b\u308a\u3044\u305f\u3060\u3051\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>ajax\u3092\u4f7f\u3044\u3053\u306a\u305b\u308b\u3088\u3046\u306b\u306a\u308c\u3070\u3001<span style=\"color: #0000ff;\"><strong>\u30b9\u30d4\u30fc\u30c9\u611f\u3042\u3075\u308c\u308b\u5feb\u9069\u306a\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8<\/strong><\/span>\u3092\u958b\u767a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u672c\u683c\u7684\u306a\u5b9f\u88c5\u306b\u306f\u5c11\u3057\u305f\u304f\u3055\u3093\u306e\u51e6\u7406\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u304c\u3001\u57fa\u672c\u3092\u7406\u89e3\u3057\u3066\u3044\u308c\u3070\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u6a5f\u4f1a\u306bajax\u3067\u306e\u5b9f\u88c5\u3092\u52c9\u5f37\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3082\u3057ajax\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u3089\u3053\u306e\u8a18\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u306d\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f! \u30d5\u30ea\u30fc\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u9577\u702c\u3067\u3059\u3002 \u307f\u306a\u3055\u3093\u306fajax(\u30a8\u30a4\u30b8\u30e3\u30c3\u30af\u30b9)\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u304b\uff1f ajax(\u30a8\u30a4\u30b8\u30e3\u30c3\u30af\u30b9)\u3063\u3066\u306a\u3093\u3060\u304b\u96e3\u3057\u305d\u3046\u3060\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u305b\u3093\u304b\uff1f \u3053\u306e\u8a18\u4e8b\u3067\u306f\u9806\u3092\u8ffd\u3063\u3066\u521d\u5fc3\u8005\u306b\u308f\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":28978,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2352],"tags":[593,14],"class_list":["post-28967","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-study","tag-ajax","tag-ruby-on-rails"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/28967\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/28967\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"1970-01-01T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:44:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-35.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:44:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967\"},\"wordCount\":379,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-35.jpg\",\"keywords\":[\"ajax\",\"Ruby on Rails\"],\"articleSection\":[\"Ruby\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967\",\"name\":\"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-35.jpg\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:44:18+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-35.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image-35.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/28967#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/28967","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/28967","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"1970-01-01T00:00:00+00:00","article_modified_time":"2024-05-06T02:44:18+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-35.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/28967#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/28967"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:44:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/28967"},"wordCount":379,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/28967#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-35.jpg","keywords":["ajax","Ruby on Rails"],"articleSection":["Ruby\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/28967","url":"https:\/\/www.sejuku.net\/blog\/28967","name":"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/28967#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/28967#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-35.jpg","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:44:18+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/28967#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/28967"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/28967#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-35.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-35.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/28967#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Rails\u5165\u9580\u3011ajax\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/28967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=28967"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/28967\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/28978"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=28967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=28967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=28967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}