Compare commits
No commits in common. "master" and "1.6.10" have entirely different histories.
@ -24,10 +24,6 @@ module CanCan
|
||||
def load_and_authorize_resource
|
||||
load_resource
|
||||
authorize_resource
|
||||
if update_actions.include?(@params[:action].to_sym)
|
||||
update_resource
|
||||
authorize_resource # Reauthorize the now-updated resource
|
||||
end
|
||||
end
|
||||
|
||||
def load_resource
|
||||
@ -90,10 +86,6 @@ module CanCan
|
||||
assign_attributes(resource)
|
||||
end
|
||||
|
||||
def update_resource
|
||||
resource.assign_attributes(resource_params || {})
|
||||
end
|
||||
|
||||
def assign_attributes(resource)
|
||||
resource.send("#{parent_name}=", parent_resource) if @options[:singleton] && parent_resource
|
||||
initial_attributes.each do |attr_name, value|
|
||||
@ -260,10 +252,6 @@ module CanCan
|
||||
[:new, :create] + [@options[:new]].flatten
|
||||
end
|
||||
|
||||
def update_actions
|
||||
[:update] #TODO: check what @options is for
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def extract_key(value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user