mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 00:36:12 +01:00
Merge branch 'master' into new-gui
Conflicts: Gemfile.lock
This commit is contained in:
parent
fa537fbeb0
commit
eb1502d4e0
28 changed files with 385 additions and 221 deletions
|
|
@ -12,6 +12,7 @@ class Project < ActiveRecord::Base
|
|||
scope :uncompleted, -> { where("NOT(state = ?)", 'completed') }
|
||||
|
||||
scope :with_name_or_description, lambda { |body| where("name LIKE ? OR description LIKE ?", body, body) }
|
||||
scope :with_namepart, lambda { |body| where("name LIKE ?", body + '%') }
|
||||
|
||||
validates_presence_of :name
|
||||
validates_length_of :name, :maximum => 255
|
||||
|
|
@ -88,7 +89,7 @@ class Project < ActiveRecord::Base
|
|||
# as a result of acts_as_state_machine calling state=() to update the attribute
|
||||
def transition_to(candidate_state)
|
||||
case candidate_state.to_sym
|
||||
when aasm_current_state
|
||||
when aasm.current_state
|
||||
return
|
||||
when :hidden
|
||||
hide!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue