Refactor for authorization sanity

This commit is contained in:
2015-02-19 16:29:17 +01:00
parent a1474e934a
commit 5b3c1a9007
22 changed files with 190 additions and 80 deletions
+2 -2
View File
@@ -150,7 +150,7 @@ class List
set_price # should not be needed, but extra secure
orders.map(&:close!) # close the connected orders
self.state = 'closed'
self.is_helped! if needs_help?
self.mark_helped! if needs_help?
self.needs_payment = false
self.user_requests_closing = false # if a user requested closing, not needed anymore
self.closed_at = Time.now
@@ -173,7 +173,7 @@ class List
end
end
def is_helped!
def mark_helped!
self.needs_help = false
if save
broadcast_users 'list_helped', id: id