Merge branch 'master' into new-gui

Conflicts:
	Gemfile.lock
This commit is contained in:
Reinier Balt 2014-01-07 21:01:55 +01:00
parent fa537fbeb0
commit eb1502d4e0
28 changed files with 385 additions and 221 deletions

View file

@ -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!