-
-
Save elskwid/9129980 to your computer and use it in GitHub Desktop.
Use a concern in a Controller
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
Started GET "/" for 127.0.0.1 at 2014-02-20 22:43:21 -0800 | |
Processing by WebsiteController#index as HTML | |
Rendered text template (0.0ms) | |
Completed 200 OK in 2.3ms (Views: 1.9ms | ActiveRecord: 0.0ms) | |
some_method from shared logic | |
some_method from overridden in website controller |
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
class WebsiteController < ApplicationController | |
include SharedControllerLogic | |
def index | |
render text: "hello world" | |
end | |
def some_method | |
super | |
puts "some_method from overridden in website controller" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment