This file contains hidden or 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 Organization | |
def to_param | |
"42" | |
end | |
def saved? | |
rand < 0.5 | |
end | |
end |
This file contains hidden or 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
###Watered down version, how do I get current_user in the initialize method? | |
module Protect | |
extend ActiveSupport::Concern | |
module ClassMethods | |
#stuff | |
end | |
module InstanceMethods | |
def initialize (*args, &block) |