Created
December 23, 2011 14:08
-
-
Save mxrguspxrt/1514304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# atm its so for my class | |
class ApplicationController < ActionController::Base | |
extend ActiveSupport::Concern | |
protect_from_forgery | |
#enable_authorization | |
respond_to :html, :xml, :json | |
def self.inherited base | |
# Inherited resources fix | |
throw base | |
end | |
end | |
# How could I write it similar to https://github.com/rails/rails/blob/master/activesupport/lib/active_support/concern.rb ? "extended do" or smth similar, so it would be more pretty for the eyes | |
# Smth similar to: | |
class ApplicationController < ActionController::Base | |
extend ActiveSupport::Concern | |
protect_from_forgery | |
#enable_authorization | |
respond_to :html, :xml, :json | |
extended do | |
# Inherited resources fix | |
throw self | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment