Skip to content

Instantly share code, notes, and snippets.

@jswanner jswanner/routes.rb
Last active Dec 12, 2015

Embed
What would you like to do?
Rails 3 concern-like, with options.
sociable = ->(options = {}) {
resources :comments, options
resources :categories, options
resources :tags, options
}
resources :messages do sociable.(only: :create) end
resources :posts, &sociable
resources :items, &sociable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.