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

Updated to set the page layout when rendering custom actions #1719

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants

Did it the same as ResourceController with an ugly cut and paste, but moving determine_active_admin_layout to BaseController seemed uglier without bigger changes and was hurting my Java brain waaay to much.

I didn't add any tests as there were none in the original as well as the fact that heaps of tests were failing for me in the build.

I did test that it worked in my local active admin project.

Andrew Pietsch Updated to set the page layout when rendering custom actions (same as…
… ResourceController). Ugly cut and paste, but moving determine_active_admin_layout to BaseController seemed uglier without bigger changes.
9eb53e1
Contributor

pcreux commented Oct 17, 2012

Thanks for working on this @pietschy. Could you add a scenario to test this? There is a step to ensure that the active admin layout is set: https://github.com/gregbell/active_admin/blob/master/features/registering_pages.feature#L20

Yep, I'll get onto it.

Any advice on how to create the view from within the scenario?

Another bug is that it doesn't render the template for partials either. I noticed that determine_active_admin_layout isn't even called in the partial case. Any idea's on that one?

Contributor

gregbell commented Nov 8, 2012

@pietschy Use the https://github.com/gregbell/active_admin/blob/master/features/step_definitions/configuration_steps.rb#L89 step to add a file to the test rails app which will be removed at the end of the scenario.

Andrew Pietsch added some commits Nov 22, 2012

Hi @gregbell, @pcreux

I've finally got around to updating the test but made newbie error and also did a git fetch upstream & merge (as per https://help.github.com/articles/fork-a-repo) but should have probably rebased it. Do you have any advice on the best way to fix that? Should I just create a new branch and re-apply my changes?

Thanks & cheers

Contributor

pcreux commented Dec 3, 2012

Yup, create a new branch and use git cherry-pick COMMIT to apply the changes. You can then push --force to your branch on github to update this pull request.

Hi @gregbell, @pcreux,

Instead of doing a push --force I just created a new pull request at gregbell#1823. Didn't trust myself to not screw things up.

@gregbell gregbell closed this Jan 15, 2013

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