Skip to content

Instantly share code, notes, and snippets.

View rah00l's full-sized avatar
🏠
Working from home

rahul patil rah00l

🏠
Working from home
View GitHub Profile
@rbmrclo
rbmrclo / routes.rb
Last active March 29, 2018 14:34
Rails Best Practices: Routing Concerns in Rails 4
# Routing Concerns is an attempt to DRY up your config/routes.rb.
# The basic idea is to define common sub-resources (like comments)
# as concerns and include them in other resources/routes.
# Here’s the obvious example:
concern :commentable do
resources :comments
end
concern :remarkable do