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 authored and iox committed Aug 12, 2013
1 parent ebb4649 commit 91eb4a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/story.rb
Expand Up @@ -12,8 +12,7 @@ class Story < ActiveRecord::Base

belongs_to :project, :inverse_of => :stories, :counter_cache => true
belongs_to :status, :class_name => "StoryStatus", :inverse_of => :stories

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

children :tasks

Expand Down
2 changes: 2 additions & 0 deletions app/models/task.rb
Expand Up @@ -13,6 +13,8 @@ class Task < ActiveRecord::Base
has_many :task_assignments, :dependent => :destroy, :inverse_of => :task
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 91eb4a3

Please sign in to comment.