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 blacklight configuration for registering additional response formats... #761

Merged
merged 1 commit into from
Feb 10, 2014

Conversation

cbeer
Copy link
Member

@cbeer cbeer commented Feb 7, 2014

... for the #index action

Options include:

  • do the default
    config.index.respond_to.yaml = true
  • don't render the format
    config.index.respond_to.yaml = true
  • options for render
    config.index.respond_to.yaml = { layout: 'custom-layout' }
  • custom proc to render
    config.index.respond_to.yaml = lambda { render text: "stuff" }
  • controller method to render
    config.index.respond_to.yaml = :my_custom_yaml_serialization

@cbeer cbeer added this to the 5.1.0 milestone Feb 7, 2014
@jcoyne
Copy link
Member

jcoyne commented Feb 8, 2014

@cbeer Do you want to cut a 5.0.2 before I merge these commits targeting 5.1.0?

@cbeer
Copy link
Member Author

cbeer commented Feb 8, 2014

I think that's a good idea. At least until having them open blocks immediate work (at which point, it's worth cutting a release-5.0 branch and backporting changes from master, I suppose)

…ats for the #index action

Options include:

- do the default
    config.index.respond_to.yaml = true

- don't render the format
    config.index.respond_to.yaml = true

- options for render
    config.index.respond_to.yaml = { layout: 'custom-layout' }

- custom proc to render
    config.index.respond_to.yaml = lambda { render text: "stuff" }

- controller method to render
    config.index.respond_to.yaml = :my_custom_yaml_serialization
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 4dd0ff6 on index-response-formats into d1a9955 on master.

@cbeer
Copy link
Member Author

cbeer commented Feb 10, 2014

12:01 ] jcoyne> cbeer: what's the use case for blacklight #761
12:01 ] jcoyne> why would I want to add a response proc in the config?
12:02 ] cbeer> jcoyne: i don't know about the proc (it was just convenient), but the use case for #761 in general is:
12:02 ] cbeer> in the blacklight-table plugin (or, the blacklight-map plugin, or something else), i need a way to inject different response types for the #index action without overriding the #index action.
12:03 ] cbeer> so, for blacklight-table, it makes sense (to me, at least) to add a csv output (which i think should play nice with some of the js table-displaying infinite scrolling widgets)

jcoyne added a commit that referenced this pull request Feb 10, 2014
Add blacklight configuration for registering additional response formats...
@jcoyne jcoyne merged commit ed983ff into master Feb 10, 2014
@jcoyne jcoyne deleted the index-response-formats branch February 10, 2014 20:07
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

4 participants