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

Add option to customize the returned Content JSON data #846

Merged
merged 5 commits into from
Nov 24, 2018

Conversation

melvinsembrano
Copy link
Contributor

Add option to customize the returned Content JSON data

This PR will add an option for dev to customize the content JSON data.

This will enable JS-Client (e.g. React, VueJS apps) to use the page fragments and custom display it on client apps.

@GBH GBH merged commit a4f3776 into comfy:master Nov 24, 2018
@GBH
Copy link
Member

GBH commented Nov 24, 2018

Thanks. Merged with some changes:

  • renamed it to page_to_json_options
  • page has accessor for content so we can assign to it.
  • default is methods: [:content], except: [:content_cache]. That way you can exclude :content. Before it was injected into the hash whenever you want that or not.

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.

None yet

2 participants