starburstgem / starburst

In-app announcements to users in your Rails app
MIT License
257 stars 29 forks source link

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

Open EdHintz opened 2 years ago

EdHintz commented 2 years ago

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 # 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 commented 2 years ago

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?