Skip to content

Commit

Permalink
acts-as-list-model-changes
Browse files Browse the repository at this point in the history
Now two changes to our models:

SHOW_PATCH
  • Loading branch information
bryanlarsen committed Nov 14, 2011
1 parent 35d36b9 commit cde2264
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/story.rb
Expand Up @@ -11,7 +11,7 @@ class Story < ActiveRecord::Base
belongs_to :project
belongs_to :status, :class_name => "StoryStatus"

has_many :tasks, :dependent => :destroy
has_many :tasks, :dependent => :destroy, :order => :position

children :tasks

Expand Down
2 changes: 2 additions & 0 deletions app/models/task.rb
Expand Up @@ -12,6 +12,8 @@ class Task < ActiveRecord::Base
has_many :task_assignments, :dependent => :destroy
has_many :users, :through => :task_assignments, :accessible => true, :dependent => :destroy

acts_as_list :scope => :story

# --- Permissions --- #

def create_permitted?
Expand Down

0 comments on commit cde2264

Please sign in to comment.