acts_as_xlsx icon indicating copy to clipboard operation
acts_as_xlsx copied to clipboard

Support Rails 4

Open straydogstudio opened this issue 11 years ago • 12 comments
trafficstars

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?

straydogstudio avatar Apr 09 '14 21:04 straydogstudio

  • 1 for this. can somebody merge this?

andreorvalho avatar Apr 30 '14 12:04 andreorvalho

@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 avatar Apr 30 '14 14:04 straydogstudio

@straydogstudio: Thank you for fixing this issue.

phuong3030 avatar Jun 13 '14 18:06 phuong3030

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.

randym avatar Jun 13 '14 18:06 randym

Nice to hear from you @randym! No worries.

straydogstudio avatar Jun 13 '14 18:06 straydogstudio

:+1: it will be great. I have used @straydogstudio / @andreorvalho fork.

ricardodovalle avatar Jun 16 '14 05:06 ricardodovalle

Only fixing the link:

gem 'acts_as_xlsx', git: 'git://github.com/straydogstudio/acts_as_xlsx.git'

ricardodovalle avatar Jun 16 '14 05:06 ricardodovalle

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 avatar Jun 16 '14 09:06 randym

@randym Certainly. Didn't think of limiting it to ActiveRecord. I'll look for the PR.

straydogstudio avatar Jun 16 '14 14:06 straydogstudio

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.

randym avatar Jun 16 '14 18:06 randym

No objections from me re: dropping 1.8.7. People can always use an older version.

straydogstudio avatar Jun 16 '14 21:06 straydogstudio

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.

randym avatar Jun 17 '14 03:06 randym