Current controller and action in Rails
I found out on #rubyonrails that it’s possible to get the current controller and action through the params[:controller] and params[:action] variables respectively.
These are definitely time savers when you’re building a menu structure based on the current controller and action.
Tags: rails