Sha256: b245e4d2e352e8fecee3cff982fed0a63a45d60f5b619b01b30f6b285faecc60
Contents?: true
Size: 913 Bytes
Versions: 2
Compression:
Stored size: 913 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, :registration_number 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ninoxe-1.1.5 | app/models/chouette/group_of_line.rb |
ninoxe-1.1.4 | app/models/chouette/group_of_line.rb |