Ruby on Rails Tuesday, March 4, 2014

I need to use the model name 'Action' (which will not work in Rails 4.0.3) for business reasons (it's a product name). If I name the actual model something else, is there any way to (maybe with mod_rewrite) make the URL appear the way I need it to while keeping everything working in Rails?

I've tried using the controller flag in routes.rb to try to fix this, and it seems to work, but causes a lot of problems elsewhere -- basically anything where I use the automatic URLs, like

link_to 'Link text', @instance_var

needs to be rewritten to use the long-hand route helper, like this

link_to 'Link text', action_path(@instance_var)

What am I missing here?

Thanks in advance,

Walter

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3B7C311D-8FA4-40E7-ACCB-AEC9C499F9C9%40wdstudio.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment