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

Page generator should validate content block attributes #337

Open
mitramejia opened this issue Oct 25, 2017 · 2 comments
Open

Page generator should validate content block attributes #337

mitramejia opened this issue Oct 25, 2017 · 2 comments

Comments

@mitramejia
Copy link

mitramejia commented Oct 25, 2017

As described in the docs, some attributes on Fae::Page are invalid names for content blocks. These attributes are:

  1. title
  2. slug
  3. position
  4. on_prod
  5. on_stage
  6. created_at
  7. updated_at

Using rails g fae:page page_name title slug position should raise an error to avoid generating a page with invalid attributes.

@jamesmk
Copy link
Member

jamesmk commented Oct 29, 2017

Thanks for the suggestion @mitramejia. I'm looking to make improvements on static pages in v2.0 and have been thinking about the attributes' usefulness. I'd like to deprecate slug, on_prod and on_stage, and then rename title to something more obscure. These changes should make name clashing more rare. While I'm in there, I'll see what something like this would take.

@Spone
Copy link
Contributor

Spone commented Nov 15, 2017

@jamesmk my 2 cents: I think it's a good idea to deprecate slug, as it's trivial to add this behavior with http://norman.github.io/friendly_id/

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

No branches or pull requests

3 participants