Class: RTM::AR::Association
- Inherits:
-
Reifiable
- Object
- TMDelegator
- Construct
- Reifiable
- RTM::AR::Association
- Defined in:
- lib/rtm/activerecord/association_and_role.rb,
lib/rtm/activerecord.rb
Instance Method Summary collapse
Methods included from Sugar::Role::Counterparts
#counterpart, #counterparts, #counterplayer, #counterplayers, #peerplayers, #peers
Methods included from Sugar::Association::HashAccess
Methods included from Construct
Methods inherited from Reifiable
Methods inherited from Construct
Methods inherited from TMDelegator
#__getobj__, #__setobj__, aka_property, class_delegate, delegate, #eql?, equality, #hash, #initialize, parent, property, property_set, wrapper_cache
Constructor Details
This class inherits a constructor from RTM::AR::TMDelegator
Instance Method Details
#filter_roles(*args) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/rtm/activerecord/association_and_role.rb', line 29 def filter_roles(*args) if args.size == 1 t = topic_map.get(args.first) return self.roles.find(:all,:conditions => ["ttype_id = ?", t.__getobj__.id]) end false end |
#id ⇒ Object
23 24 25 |
# File 'lib/rtm/activerecord/association_and_role.rb', line 23 def id __getobj__.id end |