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

Undefined method error on Rails 7.2 #178

Closed
arni1981 opened this issue May 28, 2024 · 3 comments
Closed

Undefined method error on Rails 7.2 #178

arni1981 opened this issue May 28, 2024 · 3 comments

Comments

@arni1981
Copy link

I'm getting undefined method 'model' for class SolidCache::Entry on Rails 7.2.

I tried it on a brand new Rails project and just did gem "rails", github: "rails/rails", branch: "7-2-stable"

It happens whether I do <%= cache%> in a view or Rails.cache.fetch

@MaksJS
Copy link

MaksJS commented Jun 3, 2024

A possible quick & dirty fix (to be tested):

ActiveSupport.on_load(:solid_cache_entry) do
  class << self
    def model = self
    def scope_for_create = {}
  end
end

@npezza93
Copy link
Contributor

This is fixed now that #179 is merged

@arni1981
Copy link
Author

Ok, I will close it then, since it is working when pointing to the main branch of solid_cache. it has not been released yet though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants