Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

initialise attributes after a resource is created by CanCan::InheritedResource #546

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
Contributor

mccraigmccraig commented Jan 11, 2012

tracking down a problem using CanCan with ActiveAdmin i saw that resources still seem to need initial_attributes setting after controller.build_resource is used to create a new instance of the resource

this patch sets the initial_attributes in the same way the ControllerResource.build_resource does

Contributor

mccraigmccraig commented Jan 11, 2012

and i see this is a dup of : #515

Sija pushed a commit to Sija/cancan that referenced this pull request Mar 19, 2012

Collaborator

jeremyf commented May 10, 2012

[Verified] The tests all pass.

Owner

ryanb commented May 10, 2012

I'm a little weary to merge this since there are no tests added for this functionality. Someone want to tackle adding specs to inherited_resource_spec.rb for this?

Collaborator

jeremyf commented May 10, 2012

Sorry about missing that one. Without tests, merge doesn't make sense. @mccraigmccraig can you write up some tests?

Contributor

mccraigmccraig commented May 11, 2012

i can : bit busy over the next few days but will get some done soon

Collaborator

mikepack commented Jun 5, 2012

Pull #640 includes specs and more consistent spacing. @ryanb, ready to pull?

Collaborator

andhapp commented Jun 9, 2012

Hello guys, I am going to close this pull request since @mikepack has added the same behaviour with specs. @mccraigmccraig: if you'd like to participate please hop over to #640. Thanks.

@andhapp andhapp closed this Jun 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment