Tag Archives: routes

How to render your blog posts on your homepage in Refinery CMS

Add this line in your routes.rb, just above the line where you see: mount Refinery::Core::Engine, :at => ‘/’

Debugging Routes

To see how an external request would map to your internal path: Sample: To reload routes.rb if you made changes to it: ActionController::Routing::Routes.reload —- To generate a path use generate method:

Avoid Duplication of Hash Options

There are lots methods in Rails where the last argument is a Hash. Sometimes the same Hash is passed into more than one method, causing you to repeat yourself. For example, when using validation helpers in your models, you may be doing something like this: Using with_options within a Model: Notice, :on => create is […]