Add specs for resource attributes.

Remove inconsistent line breaks.
This commit is contained in:
Mike Pack
2012-06-04 22:13:57 -06:00
committed by Anuj Dutta
parent c2c0b86c3a
commit b965f5bab4
2 changed files with 18 additions and 2 deletions

View File

@@ -6,13 +6,11 @@ module CanCan
@controller.send :association_chain
@controller.instance_variable_get("@#{instance_name}")
elsif new_actions.include? @params[:action].to_sym
resource = @controller.send :build_resource
initial_attributes.each do |attr_name, value|
resource.send("#{attr_name}=", value)
end
resource
else
@controller.send :resource
end