Skip to content

Commit

Permalink
There's no need to access Railties through self.class
Browse files Browse the repository at this point in the history
Closes #9386
  • Loading branch information
spastorino committed Feb 27, 2013
1 parent 02037c3 commit 45aabe6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion railties/lib/rails/engine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'rails/railtie'
require 'rails/engine/railties'
require 'active_support/core_ext/module/delegation'
require 'pathname'
require 'rbconfig'
Expand Down Expand Up @@ -467,7 +468,7 @@ def eager_load!
end

def railties
@railties ||= self.class::Railties.new
@railties ||= Railties.new
end

# Returns a module with all the helpers defined for the engine.
Expand Down

3 comments on commit 45aabe6

@pixeltrix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spastorino did you get an answer from @drogus why he did this way in the first place?

@spastorino
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pixeltrix ...

12:58:09 PM Santiago Pastorino: hey Piotr
12:58:15 PM Santiago Pastorino: https://github.com/rails/rails/commit/32a5b49911b88e8e410583d382e8253004abce50#L3L157
12:58:17 PM Santiago Pastorino: why this?
12:58:28 PM Santiago Pastorino: for more info https://github.com/rails/rails/commit/48d5a33269eac16e7927c8811bfdc6010a965959#L2R472
1:07:19 PM Piotr Sarnacki: this was done because we had different implementations for Engine::Railties and Application::Railties
1:07:51 PM Piotr Sarnacki: this: https://github.com/rails/rails/blob/32a5b49911b88e8e410583d382e8253004abce50/railties/lib/rails/engine/railties.rb
1:08:06 PM Piotr Sarnacki: vs this: https://github.com/rails/rails/blob/32a5b49911b88e8e410583d382e8253004abce50/railties/lib/rails/application/railties.rb
1:08:50 PM Santiago Pastorino: ok
1:08:55 PM Santiago Pastorino: can be removed now so
1:09:00 PM Piotr Sarnacki: yup, probably yes
1:10:55 PM Santiago Pastorino: cool

@pixeltrix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spastorino thanks - understand why now.

Please sign in to comment.