Monthly Archives: September 2014

Rails Routes Files – For Dummies

Want to tidy up your routes files and make them generally more professional-coder-looking? Consider these ideas which I’ve come across in my first few weeks at my new job:

Concerns

You can use concerns to dry up your routes file. If many resources have the same list of things nested inside them you can list the nest once with a name like

concern :name_of_my_list do
  put the list in here
end

Continue reading

2 Replies