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

Stop using mattr_accessor, fixes up to the postgres :limit issue. #404

Closed
wants to merge 4 commits into from

Conversation

shekibobo
Copy link
Contributor

Fixes travis builds up to the postgres limit issue #416 and #409.

As an added bonus, I also added an in stall generator which creates an acts_as_taggable_on.rb initializer to set up configuration options.

@shekibobo
Copy link
Contributor Author

Any idea why the spec/schema.rb sets integers with :limit => 11? That's breaking the specs in Postgres on Travis (though those pass just fine on my system using wwtd because "No integer type has byte size 11." Any thoughts on this?

@bf4
Copy link
Collaborator

bf4 commented Dec 10, 2013

Can you rebase against master and force push?

mattr_accessor is removed in (not sure which version of)
ActiveSupport. This seems syntactically more correct than
using class variables.

I would be more interested in seeing something like a configuration
object on ActsAsTaggableOn with an initializer in which these
options could be configured. I'm not sure if there is a reason
or particular use-case for not doing that, but moving it there
would be a breaking change in the API for AATO.
@bf4
Copy link
Collaborator

bf4 commented Dec 10, 2013

So, the mattr_accessor issue is fixed in master, now, but the other changes are interesting. Will review.

@fguillen
Copy link

I'm using v2.4.1 and I having the error:

acts-as-taggable-on-2.4.1/lib/acts-as-taggable-on.rb:10:in `<module:ActsAsTaggableOn>': undefined method `mattr_accessor' for ActsAsTaggableOn:Module (NoMethodError)

I suppose is related to this thread.

How can I define my "acts-as-taggable-on" dependency in a .gemspec file to use a version with this issue fixed?

I think the fixed version must be in "rubygems" in order to be able to be included in a .gemspec file :/. I think I can't point to a git repo in a .gemspec file.

@bf4
Copy link
Collaborator

bf4 commented Dec 13, 2013

@fguillen Yes, only bundler can install from source. Until someone with push access can release a new version of the gem, your options are to fork and release a temporary name-spaced build of your own, or to do so with your own gemserver.

@fguillen
Copy link

Thanks for the support @bf4 my workaround has been to add this require:

require "active_support/core_ext/module"

Before:

require "acts-as-taggable-on"

@bf4
Copy link
Collaborator

bf4 commented Dec 13, 2013

@fguillen that works

@bf4
Copy link
Collaborator

bf4 commented Dec 27, 2013

This PR should be renamed to 'Add configuration initializer generator', no?

@seuros seuros closed this May 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants