class DMap::Associations::HasN
Attributes
associations[RW]
Public Class Methods
associations()
click to toggle source
# File lib/dmap/associations/hasn.rb, line 6 def self.associations; true; end
field()
click to toggle source
# File lib/dmap/associations/hasn.rb, line 12 def self.field "has n, " end
is_valid?(command=nil)
click to toggle source
# File lib/dmap/associations/hasn.rb, line 16 def self.is_valid?(command=nil) (!command.nil? or command) end
parent_name()
click to toggle source
# File lib/dmap/associations/hasn.rb, line 8 def self.parent_name "HasN" end
validate(command=nil)
click to toggle source
# File lib/dmap/associations/hasn.rb, line 20 def self.validate(command=nil) command = command.split('-') command[1] = nil if command[1].nil? command[1] = command[1].to_sym unless command[1].nil? or command[1] == "true" or command[1] == "false" {:fields => command[0].underscore.to_sym, :through => command[1].to_sym} end