Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add refactoring in the controller generator #71

Merged
merged 1 commit into from

2 participants

@MarceloCajueiro

Call respond_to?(:before_action) to ActionController::Base instead of
call it to ApplicationController avoiding ask to ApplicationController
if it is defined.

Kudos to @lucasmazza

@MarceloCajueiro MarceloCajueiro Add refactoring in the controller generator
Call `respond_to?(:before_action)` to `ActionController::Base` instead of
call it to `ApplicationController` avoiding ask to ApplicationController
if it is defined.

Kudos to @lucasmazza
5f48506
@lucasmazza lucasmazza merged commit 6b57da9 into from
@lucasmazza
Owner

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:

@MarceloCajueiro MarceloCajueiro deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 11, 2013
  1. @MarceloCajueiro

    Add refactoring in the controller generator

    MarceloCajueiro authored
    Call `respond_to?(:before_action)` to `ActionController::Base` instead of
    call it to `ApplicationController` avoiding ask to ApplicationController
    if it is defined.
    
    Kudos to @lucasmazza
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/generators/rails/responders_controller_generator.rb
View
2  lib/generators/rails/responders_controller_generator.rb
@@ -24,7 +24,7 @@ def orm_instance_update(params)
end
def controller_before_filter
- if defined?(ApplicationController) && ApplicationController.respond_to?(:before_action)
+ if ActionController::Base.respond_to?(:before_action)
"before_action"
else
"before_filter"
Something went wrong with that request. Please try again.