lib/banken.rb in banken-1.0.1 vs lib/banken.rb in banken-1.0.2
- old
+ new
@@ -19,11 +19,10 @@
hide_action :permitted_attributes
hide_action :loyalty
hide_action :banken_user
hide_action :skip_authorization
hide_action :verify_authorized
- hide_action :loyalties
end
end
class << self
def loyalty!(controller_name, user, record=nil)
@@ -47,11 +46,11 @@
params.require(name).permit(loyalty(record).permitted_attributes)
end
def loyalty(record=nil, controller_name=nil)
controller_name = banken_controller_name unless controller_name
- loyalties[record] ||= Banken.loyalty!(controller_name, banken_user, record)
+ Banken.loyalty!(controller_name, banken_user, record)
end
def banken_user
current_user
end
@@ -64,13 +63,9 @@
raise AuthorizationNotPerformedError unless banken_loyalty_authorized?
end
def banken_loyalty_authorized?
!!@_banken_loyalty_authorized
- end
-
- def loyalties
- @_banken_loyalties ||= {}
end
private
def banken_action_name