Ruby 如何在Rails 4中设置链接到辅助对象的默认主机?
目前我正在使用老式的方式将Ruby 如何在Rails 4中设置链接到辅助对象的默认主机?,ruby,ruby-on-rails-4,helper,Ruby,Ruby On Rails 4,Helper,目前我正在使用老式的方式将链接到 <%= link_to 'Attend Survey', {:controller => :survey, :action => :get_personal_data}, :class => 'btn btn-primary' %> 这确实应该行得通。可能是路径中的~符号混淆了Rails吗?也许吧,但不幸的是,我目前没有办法跳过它。你能做rake routes并发布输出吗?Rails似乎仍然存在问题-> Pref
链接到
<%= link_to 'Attend Survey', {:controller => :survey, :action => :get_personal_data}, :class => 'btn btn-primary' %>
这确实应该行得通。可能是路径中的~
符号混淆了Rails吗?也许吧,但不幸的是,我目前没有办法跳过它。你能做rake routes
并发布输出吗?Rails似乎仍然存在问题->
Prefix Verb URI Pattern Controller#Action
survey_context GET /survey/context(.:format) survey#get_personal_data
GET /survey/selfesteem/:id(.:format) survey#get_self_esteem
survey_index GET /survey/index(.:format) survey#index
survey_thank_you GET /survey/thank_you(.:format) survey#thank_you
POST /survey/context(.:format) survey#create_person
POST /survey/selfesteem/:id(.:format) survey#create_self_esteem_for_person
root GET / survey#index