Skip to content

Instantly share code, notes, and snippets.

@panych
Created March 19, 2014 22:12
Show Gist options
  • Select an option

  • Save panych/9652555 to your computer and use it in GitHub Desktop.

Select an option

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