Fix issues in group handling
authorPiotr Solnica <piotr.solnica@gmail.com>
Fri, 18 Oct 2013 17:21:18 +0000 (19:21 +0200)
committerPiotr Solnica <piotr.solnica@gmail.com>
Fri, 18 Oct 2013 17:21:19 +0000 (19:21 +0200)
commitbe034cc03bdecf6145eacc32c1bca8b7336b16c0
treef3bc3b3d44ecf05d115dc26479a2a42df550b765
parentf027e3b88dea70bc2b01f50fb4488ed78db69006
Fix issues in group handling

  * Fix case when creator of a group is being demoted
  * Fix error handling in forms
  * Refactor update action to a use-case
app/controllers/memberships_controller.rb
app/models/membership.rb
app/use_cases/update_membership.rb [new file with mode: 0644]
app/validators/membership_validator.rb
app/views/memberships/edit.html.erb
app/views/memberships/index.html.erb
app/views/memberships/new.html.erb
test/fast_test_helper.rb
test/functional/groups_controller_test.rb
test/functional/memberships_controller_test.rb
test/micro/validators/membership_validator_test.rb