ruby 2.1.3
Rails 4.2.3
ローカルでのPCはmac
sakuraはVPSのcentos
nginx1.8.0
unicorn
プログラム初心者になります。
プログラムに関係ないviewのページを作りたいと考えているのですがRouting Errorとなり設定出来ません。
方法を教えて頂けませんでしょうか?
views/home/index.html.erbに以下linkタグを書いています。
<%= link_to '詳しい説明', 'xxxx.html.erb', { :class => "btn btn-primary" } %>
xxxx.html.erbファイルの設置場所
views/home/xxxx.html.erb
xxxx.html.erbの内容は
サイトの詳しい説明でidやその他値の引き継ぎなどは必要ないとお考え下さいませ。
現在のroutes設定は
root_path GET / home#index home_index_path POST /home(.:format) home#create new_home_path GET /home/new(.:format) home#new edit_home_path GET /home/:id/edit(.:format) home#edit home_path GET /home/:id(.:format) home#show PATCH /home/:id(.:format) home#update PUT /home/:id(.:format) home#update DELETE /home/:id(.:format) home#destroy home_xxxx_path GET /home/xxxx(.:format) home#xxxx inquiry_path GET /inquiry(.:format) inquiry#index inquiry_confirm_path POST /inquiry/confirm(.:format) inquiry#confirm inquiry_thanks_path POST /inquiry/thanks(.:format) inquiry#thanks
HomeControllerの設定内容
class HomeController < ApplicationController def index end def show end def xxxx end
どの様にxxxx.html.erbにリンクを行えば良いのでしょうか?
ご教授頂けると幸いです。
宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/10/13 14:07
2015/10/13 14:10 編集
2015/10/16 16:20