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

Runtime error for ActiveRecordBase::sanitize call in Starburst #87

Open
EdHintz opened this issue Mar 1, 2022 · 1 comment
Open

Runtime error for ActiveRecordBase::sanitize call in Starburst #87

EdHintz opened this issue Mar 1, 2022 · 1 comment

Comments

@EdHintz
Copy link

EdHintz commented Mar 1, 2022

Using Rails 6.1.4.4 and ruby '2.6.9' with the latest (1.0.3) Starburst gem, I get the following run time error

undefined method `sanitize' for #Class:0x00007fd49fa3ddd0
Did you mean? sanitize_sql

In models/starburst/announcement.rb
scope :unread_by, lambda {|current_user|
joins("LEFT JOIN starburst_announcement_views ON
starburst_announcement_views.announcement_id = starburst_announcements.id AND
starburst_announcement_views.user_id = #{Announcement.sanitize(current_user.id)}")
.where("starburst_announcement_views.announcement_id IS NULL AND starburst_announcement_views.user_id IS NULL")
}

According to this sanitize was removed and replaced.

@EdHintz
Copy link
Author

EdHintz commented Mar 1, 2022

I cloned the starburst repo and noticed that the latest code in github does not match what is hosted on rubygem. Maybe you just need to republish?

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

1 participant