Skip to content

Instantly share code, notes, and snippets.

@tadast
Created September 14, 2012 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadast/3723042 to your computer and use it in GitHub Desktop.
Save tadast/3723042 to your computer and use it in GitHub Desktop.
# helpers
module PublicHelper
def router_attributes
{
"data-router-class" => "#{controller_name.to_s.titleize}Controller",
"data-router-action" => action_name.to_s
}
end
end
# layouts/public.haml
%body{router_attributes}
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment