mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-06 12:50:19 +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
|
|
@ -6,10 +6,10 @@ class Project < ActiveRecord::Base
|
|||
belongs_to :default_context, :class_name => "Context", :foreign_key => "default_context_id"
|
||||
belongs_to :user
|
||||
|
||||
named_scope :active, :conditions => { :state => 'active' }
|
||||
named_scope :hidden, :conditions => { :state => 'hidden' }
|
||||
named_scope :completed, :conditions => { :state => 'completed'}
|
||||
named_scope :uncompleted, :conditions => ["NOT(state = ?)", 'completed']
|
||||
scope :active, :conditions => { :state => 'active' }
|
||||
scope :hidden, :conditions => { :state => 'hidden' }
|
||||
scope :completed, :conditions => { :state => 'completed'}
|
||||
scope :uncompleted, :conditions => ["NOT(state = ?)", 'completed']
|
||||
|
||||
validates_presence_of :name
|
||||
validates_length_of :name, :maximum => 255
|
||||
|
|
@ -21,8 +21,8 @@ class Project < ActiveRecord::Base
|
|||
aasm_column :state
|
||||
aasm_initial_state :active
|
||||
|
||||
extend NamePartFinder
|
||||
#include Tracks::TodoList
|
||||
# extend NamePartFinder
|
||||
# include Tracks::TodoList
|
||||
|
||||
aasm_state :active
|
||||
aasm_state :hidden, :enter => :hide_todos, :exit => :unhide_todos
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue