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

default_scoped doesn't work in rails 4.0 #443

Open
TamarinEA opened this issue Jan 14, 2021 · 5 comments
Open

default_scoped doesn't work in rails 4.0 #443

TamarinEA opened this issue Jan 14, 2021 · 5 comments
Labels

Comments

@TamarinEA
Copy link

Hi.
default_scoped method In this row

self.class.base_class.default_scoped.nested_set_scope options
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
Copy link
Collaborator

parndt commented Jan 14, 2021

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
Copy link
Author

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
Copy link
Collaborator

parndt commented Jan 15, 2021

Ohh - thanks @TamarinEA that is indeed a problem

@p8
Copy link
Contributor

p8 commented Jan 15, 2021

@parndt Thanks, for the heads up.

@stale
Copy link

stale bot commented Feb 26, 2021

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.

@stale stale bot added the stale label Feb 26, 2021
@parndt parndt added the pinned label Feb 28, 2021
@stale stale bot removed the stale label Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants