Rails 4 routing error for hash_for * (hash_for_path_name)
I am migrating my application from rails 2.3.18 to rails 4.0.0. My app works fine until rails 3.2.21. but when I migrate it from rails 3.2.21 to rails 4.0.0 it gives me an error for hash_for * helper.
I got this error:
undefined method `hash_for_home_status_path' for #<#<Class:0xb636bb0c>:0xb636b0a8>
I found below method at https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_dispatch/routing/route_set.rb which is not available in rails 4 stable.
def hash_access_name(name, kind = :url)
:"hash_for_#{name}_#{kind}"
end
Is there a patch for this removal, or any replacement for the hash of the transfer options in rails 4? thanks in advance
+3
source to share
1 answer
An overview of Rails external routing in . You will probably need to update some of your viewfiles (by removing hash_for_ * and replacing it with link_to or another method).
0
source to share