Skip to content

Commit

Permalink
Merge pull request #134 from robotmay/master
Browse files Browse the repository at this point in the history
Bugfix for when deleting underneath a collection
  • Loading branch information
Robert May committed Jul 31, 2013
2 parents 655431a + c201a1b commit b25be23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/mass_edit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def persisted?

def action
case
when @action.present?
@action
when collection_ids.size > 0
'collections'
else
@action
end
end

Expand Down
1 change: 1 addition & 0 deletions spec/controllers/account/photographs_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
let(:mass_edit_attributes) do
{
action: 'delete',
collection_ids: [1,2],
photograph_ids: [not_our_photograph.id]
}
end
Expand Down

0 comments on commit b25be23

Please sign in to comment.