mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-28 10:04:07 +01:00
Work in progress: has_many_polymorphs does not work with rails 3.2 because of intrusive changes in rails internals. I think we need to rip out this dependency...
This commit is contained in:
parent
a83c8b3f92
commit
86afd42148
162 changed files with 704 additions and 8724 deletions
|
|
@ -5,19 +5,19 @@ class Context < ActiveRecord::Base
|
|||
has_many :recurring_todos, :dependent => :delete_all
|
||||
belongs_to :user
|
||||
|
||||
named_scope :active, :conditions => { :hide => false }
|
||||
named_scope :hidden, :conditions => { :hide => true }
|
||||
scope :active, :conditions => { :hide => false }
|
||||
scope :hidden, :conditions => { :hide => true }
|
||||
|
||||
acts_as_list :scope => :user, :top_of_list => 0
|
||||
extend NamePartFinder
|
||||
include Tracks::TodoList
|
||||
# extend NamePartFinder
|
||||
# include Tracks::TodoList
|
||||
|
||||
attr_protected :user
|
||||
|
||||
validates_presence_of :name, :message => "context must have a name"
|
||||
validates_length_of :name, :maximum => 255, :message => "context name must be less than 256 characters"
|
||||
validates_uniqueness_of :name, :message => "already exists", :scope => "user_id"
|
||||
validates_does_not_contain :name, :string => ',', :message => "cannot contain the comma (',') character"
|
||||
# validates_does_not_contain :name, :string => ',', :message => "cannot contain the comma (',') character"
|
||||
|
||||
def self.feed_options(user)
|
||||
# TODO: move to view or helper
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue