Sha256: ee83bdb05773acf9f3a6d28b5bf9c31304e96f5993284e1a5535fad651d4755f
Contents?: true
Size: 892 Bytes
Versions: 12
Compression:
Stored size: 892 Bytes
Contents
class Chouette::GroupOfLine < Chouette::TridentActiveRecord # FIXME http://jira.codehaus.org/browse/JRUBY-6358 self.primary_key = "id" has_and_belongs_to_many :lines, :class_name => 'Chouette::Line', :order => 'lines.name' validates_presence_of :name attr_accessible :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :lines attr_accessible :line_tokens attr_reader :line_tokens def self.nullable_attributes [:comment] end def commercial_stop_areas Chouette::StopArea.joins(:children => [:stop_points => [:route => [:line => :group_of_lines] ] ]).where(:group_of_lines => {:id => self.id}).uniq end def stop_areas Chouette::StopArea.joins(:stop_points => [:route => [:line => :group_of_lines] ]).where(:group_of_lines => {:id => self.id}) end def line_tokens=(ids) self.line_ids = ids.split(",") end end
Version data entries
12 entries across 12 versions & 1 rubygems