acts_as_xlsx
acts_as_xlsx copied to clipboard
Support Rails 4
Hey there. I've been updating axlsx_rails to support Rails 4.1, and found you need this change for acts_as_axlsx. The find(:all) method is no longer available.
I don't see any explicit documentation for passing options to the find(:all) method. I've guessed for Rails 4.1 that where(conditions) and order(order) would be useful. Perhaps the data option should be documented. Thoughts?
- 1 for this. can somebody merge this?
@andreorvalho In the meantime you can use the fork:
gem 'acts_as_axlsx', git: 'git://github.com/straydogstudio/acts_as_xlsx.git'
@randym seems busy elsewhere. Not sure when or if he will respond.
@straydogstudio: Thank you for fixing this issue.
sorry - I will try to get to this on Sunday.
Again, apologies!! from a bad maintainer!
On Wed, Apr 30, 2014 at 11:15 PM, Noel Peden [email protected] wrote:
@andreorvalho https://github.com/andreorvalho In the meantime you can use the fork:
gem 'acts_as_axlsx', git: 'git://github.com/straydogstudio/acts_as_xlsx.git'
@randym https://github.com/randym seems busy elsewhere. Not sure when or if he will respond.
— Reply to this email directly or view it on GitHub https://github.com/randym/acts_as_xlsx/pull/10#issuecomment-41801162.
Nice to hear from you @randym! No worries.
:+1: it will be great. I have used @straydogstudio / @andreorvalho fork.
Only fixing the link:
gem 'acts_as_xlsx', git: 'git://github.com/straydogstudio/acts_as_xlsx.git'
What we need here is support for ActiveRecord > 2.3.8, not a rails version. The problem with adding in a Rails::Version comparison is that it bakes in the assumption that we are running on Rails. Highly likely, but certainly not a requirement now that all that stuff has been cleanly packed into Gems.
I'll re-write this with tests today and add in a PR. I'd appreciate any feedback.
@randym Certainly. Didn't think of limiting it to ActiveRecord. I'll look for the PR.
playing with https://github.com/thoughtbot/appraisal - looks like a respectable way to handle some of the different version scenarios in testing.
Any objections to doing a 2.0 and dropping support for 1.8.7? The ROI on maintaining compatibility is near nil at this point.
No objections from me re: dropping 1.8.7. People can always use an older version.
Here be the PR https://github.com/randym/acts_as_xlsx/pull/11 I'll probably clean up the version switching a bit so it only has to happen in one place, but this is the basics.