Permalink
Browse files

Whitespaces ✂️

  • Loading branch information...
1 parent 63e3f6e commit ad89a7b01466f963151a7f6b077c088491babb67 @LaAzteca LaAzteca committed Jun 29, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/action_dispatch/routing/concerns.rb
@@ -5,7 +5,7 @@ def concern(name, &block)
@concerns ||= {}
@concerns[name] = block
end
-
+
def concerns(*names)
Array(names).flatten.compact.each do |name|
if @concerns && concern = @concerns[name]
@@ -19,12 +19,12 @@ def concerns(*names)
module ActionDispatch::Routing::Mapper::ResourcesWithConcerns
extend ActiveSupport::Concern
-
+
included do
alias_method_chain :resource, :concerns
alias_method_chain :resources, :concerns
end
-
+
def resource_with_concerns(*resources, &block)
if (options_with_concerns = resources.last).is_a?(Hash)
named_concerns = options_with_concerns[:concerns]

0 comments on commit ad89a7b

Please sign in to comment.