Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Node < ActiveRecord::Base
- has_many :counters, :dependent => :delete_all
- has_many :counter_types, :through => :counters, :uniq => true
- has_many :arena_modules
- has_many :arena_module_types, :through => :arena_modules, :uniq => true
- has_many :node_types, :through => :arena_module_types
- has_many :triggers
- belongs_to :product
- end
- class ArenaModule < ActiveRecord::Base
- belongs_to :node
- belongs_to :arena_module_type
- end
- class ArenaModuleType < ActiveRecord::Base
- has_many :arena_modules, :dependent => :delete_all
- has_many :nodes, :through => :arena_modules, :uniq => true
- has_and_belongs_to_many :node_types
- end
- class NodeType < ActiveRecord::Base
- has_and_belongs_to_many :arena_module_types
- has_many :nodes, :through => :arena_module_types
- end
Add Comment
Please, Sign In to add comment