collectiveidea / awesome_nested_set

An awesome replacement for acts_as_nested_set and better_nested_set.
MIT License
2.39k stars 492 forks source link

default_scoped doesn't work in rails 4.0 #443

Open TamarinEA opened 3 years ago

TamarinEA commented 3 years ago

Hi. default_scoped method In this row https://github.com/collectiveidea/awesome_nested_set/blob/e097e4ace1dcd523faeda44f553983e5cb5d8c1f/lib/awesome_nested_set/model.rb#L149 doesn't work in rails 4.0

NameError: undefined local variable or method `default_scoped' for #<Class:0x000000050af528>
# gems/activerecord-4.0.13/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
# gems/awesome_nested_set-3.3.1/lib/awesome_nested_set/model.rb:83:in `nested_set_scope'
# gems/awesome_nested_set-3.3.1/lib/awesome_nested_set/model.rb:154:in `nested_set_scope'
# gems/awesome_nested_set-3.3.1/lib/awesome_nested_set/model.rb:194:in `has_depth_column?'
# gems/awesome_nested_set-3.3.1/lib/awesome_nested_set/model.rb:213:in `set_depth!'

Please remove unsupported versions from gemspec.

parndt commented 3 years ago

Oh, thanks for letting us know @TamarinEA ! Looks like, luckily, this was part of #437 which hasn't been released as a gem yet. Are you using it from a git source?

@p8 FYI ^ no action required, just letting you know.

I agree, we should remove older versions of Rails from the supported list, and release the next version as 4.0.0

TamarinEA commented 3 years ago

Are you using it from a git source?

No, but I was mistake with the github link. Method in version 3.3.1 https://github.com/collectiveidea/awesome_nested_set/blob/v3.3.1/lib/awesome_nested_set/model.rb#L83 .

parndt commented 3 years ago

Ohh - thanks @TamarinEA that is indeed a problem

p8 commented 3 years ago

@parndt Thanks, for the heads up.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.