Created
November 12, 2009 16:28
-
-
Save HusseinMorsy/233033 to your computer and use it in GitHub Desktop.
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 ActiveRecord::Base | |
def self.acts_as_yaffle(options={}) | |
# ... | |
end | |
def squawk | |
# .... | |
end | |
end | |
class Duck < ActiveRecord::Base | |
acts_as_yaffle :last_squawk | |
end | |
d = Duck.new | |
d.squawk "Endlich Feierabend" | |
d.save | |
puts Duck.last.last_squawk | |
# Endlich Feierabend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment