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

Using comma with padrino ruby framework #138

Closed
wakatara opened this issue Jan 29, 2023 · 2 comments
Closed

Using comma with padrino ruby framework #138

wakatara opened this issue Jan 29, 2023 · 2 comments

Comments

@wakatara
Copy link

I'm currently upgrading a 10 year old padrino app (upgraded before 4 years ago) to padrino 0.15.2 - a sinatra and AR based framework. I'd like to use comma for csv exports (to replace MS deprecated openxml xls formats that are now broken :-/ ).

Because comma hooks into AR, I was hoping I could use it like so:

  # admin/controllers/reports.rb
  get :species_data_dump, :provides => :csv do
    @species = Species.order(:name)

    render csv: @species
  end

Perhaps predictably, I'm getting an error in that it's not expecting an instance variable here, but I imagine that's because I don't know comma internals well enough. Is there a way to hook into the rails magic you built somewhat easily?

@eitoball
Copy link
Contributor

eitoball commented Feb 8, 2023

@wakatara

I'm getting an error in that it's not expecting an instance variable here

Can you show me this error? What version of ActiveRecord are you using, and how is it required?

@eitoball
Copy link
Contributor

I am closing this issue for now. Please re-open if you can show me error.

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

No branches or pull requests

2 participants