Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved page preview functionality behind the protection of /refinery. #2089

Merged
merged 2 commits into from Dec 20, 2012

Conversation

parndt
Copy link
Member

@parndt parndt commented Dec 19, 2012

Fixes #2012

protected

def admin?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Site bar?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because if we are previewing it shouldn't take on any characteristics of admin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha.

ugisozols added a commit that referenced this pull request Dec 20, 2012
Moved page preview functionality behind the protection of /refinery.
@ugisozols ugisozols merged commit 99f6c63 into master Dec 20, 2012
@ugisozols ugisozols deleted the preview branch December 20, 2012 06:48
ugisozols added a commit that referenced this pull request Dec 21, 2012
@jbourassa
Copy link

@ugisozols @parndt : I'm not sure this is the best approach. This basically breaks previewing any custom action and home page with before_filters.

I'm trying to fix this but really I'm not satisfied with the solutions I see :

  • Implement a sort of convention that calls all actions and before_filters based on the page params
  • Provide an API on top of Rails so Refinery can detect which page(s) links to which action, and run the action when previewing.

What do you guys think of this? Am I missing something?

@jbourassa
Copy link

Here's something that I implemented as a decorator for now. Seems to work but messing with action_name sounds like a recipe for disaster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preview strips html ID attributes from elements.
3 participants