Permalink
Browse files

delegate to :class rather than 'self.class'

  • Loading branch information...
1 parent bdffd1e commit 7a439d23de4c7c187b0deda8e02138b3dccf0181 @goshakkk goshakkk committed Jan 6, 2013
@@ -209,7 +209,7 @@ module Layouts
_write_layout_method
end
- delegate :_layout_conditions, :to => "self.class"
+ delegate :_layout_conditions, to: :class
module ClassMethods
def inherited(klass) # :nodoc:
@@ -118,7 +118,7 @@ def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[])
private
- delegate :caching?, :to => "self.class"
+ delegate :caching?, to: :class
# This is what child classes implement. No defaults are needed
# because Resolver guarantees that the arguments are present and
@@ -920,7 +920,7 @@ When interpolated into a string, the `:to` option should become an expression th
delegate :logger, to: :Rails
# delegates to the receiver's class
-delegate :table_name, to: 'self.class'
+delegate :table_name, to: :class
```
WARNING: If the `:prefix` option is `true` this is less generic, see below.
@@ -410,7 +410,7 @@ def find(path)
self.isolated = false
delegate :middleware, :root, :paths, to: :config
- delegate :engine_name, :isolated?, to: "self.class"
+ delegate :engine_name, :isolated?, to: :class
def initialize
@_all_autoload_paths = nil
@@ -172,7 +172,7 @@ def generate_railtie_name(class_or_module)
end
end
- delegate :railtie_name, to: "self.class"
+ delegate :railtie_name, to: :class
def config
@config ||= Railtie::Configuration.new

0 comments on commit 7a439d2

Please sign in to comment.