Created
October 6, 2011 11:23
-
-
Save sevos/1267179 to your computer and use it in GitHub Desktop.
Semi-DCI Example
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 Department << ActiveRecord::Base | |
end |
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 DepartmentsController | |
def update_stock_value | |
stock = Department.find(params[:id]).extend Roles::Stock | |
stock.update | |
end | |
end |
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
module Roles | |
module Stock | |
def update | |
# fetch value from external application and store | |
end | |
def value | |
stock_value | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment