Created
March 15, 2011 14:53
-
-
Save zdavatz/870809 to your computer and use it in GitHub Desktop.
persistable.rb
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
def odba_target_ids | |
ids = super | |
self.each { |value| | |
if(value.is_a?(ODBA::Persistable)) | |
ids.push(value.odba_id) | |
end | |
} | |
ids.uniq | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
module Mod
def test
123
end
end
class Test
include Mod
def test
p super
p "---"
234
end
def hello
p "hello"
end
end
test = Test.new
p test.test
class SubTest < Test
def hello
super
end
end
sub = SubTest.new
sub.hello