Skip to content

Instantly share code, notes, and snippets.

@panych
Created March 19, 2014 22:12
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 panych/9652555 to your computer and use it in GitHub Desktop.
Save panych/9652555 to your computer and use it in GitHub Desktop.
Kitchen pages declaration in routes.rb
blocks = ['nav', 'ul', 'editor-text', 'title', 'btn-lnk', 'ic-a', 'grid', 'form']
get 'kitchen' => 'kitchen#index'
blocks.each do |bname|
fname = bname.gsub('-', '_')
get "kitchen/#{bname}" => "kitchen##{fname}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment