You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/gamov/.rvm/gems/ruby-1.9.3-p327@ector/gems/activerecord-3.0.19/lib/active_record/named_scope.rb:132:in `valid_scope_name?': private method `warn' called for nil:NilClass (NoMethodError)
from /Users/gamov/.rvm/gems/ruby-1.9.3-p327@ector/gems/activerecord-3.0.19/lib/active_record/named_scope.rb:102:in `scope'
from /Users/gamov/.rvm/gems/ruby-1.9.3-p327@ector/gems/paper_trail-2.6.3/lib/paper_trail/version.rb:36:in `<class:Version>'
from /Users/gamov/.rvm/gems/ruby-1.9.3-p327@ector/gems/paper_trail-2.6.3/lib/paper_trail/version.rb:1:in `<top (required)>'
because it tries to define another scope called :between.
What would be the best way to de-activate by_star in the application context? Maybe an initializer where we can specify which classes we want to include/exclude by_star scopes?
Update: I've created a blank 3.0 app and installed only by_star & paper_trail and I don't get the exception... mmm here comes gem dependencies nightmare...
The text was updated successfully, but these errors were encountered:
Ok, I figured it out:
if you place: gem 'by_star', :git => "git://github.com/radar/by_star"
BEFORE gem 'paper_trail'
in your Rails 3.0.19 gem file, then you get the error above...
I'd rather not have to rename every method in by_star to ensure it doesn't conflict with things, but I think I could make an exception for between. Please rename this method to between_times in a new patch.
This is a method name conflict defined on ActiveRecord::Base, plain and simple.
I've raised a PR to deprecate the between method for ActiveRecord at #33. I've removed it already for Mongoid since Mongoid natively defines between. Let's move this thread to #33.
Adding this gem to my app makes it crash on boot:
It happens on the line:
because it tries to define another scope called :between.
What would be the best way to de-activate by_star in the application context? Maybe an initializer where we can specify which classes we want to include/exclude by_star scopes?
Update: I've created a blank 3.0 app and installed only by_star & paper_trail and I don't get the exception... mmm here comes gem dependencies nightmare...
The text was updated successfully, but these errors were encountered: