Skip to content

Instantly share code, notes, and snippets.

class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
# Convenient little Rails view helper that does exactly what it says
def pluralize_with_delimiter(count, singular, plural = nil)
pluralize(number_with_delimiter(count), singular, plural)
end