socialpandas / sidekiq_monitor

Advanced monitoring for Sidekiq
MIT License
230 stars 35 forks source link

Rails 4 compatability #13

Closed snoblenet closed 10 years ago

snoblenet commented 10 years ago

On Rails 4 with the protected_attributes gem I am getting ERROR: Can't mass-assign protected attributes for Sidekiq::Monitor::Job: queue, class_name, args, retry, enqueued_at, status, name

thoughtchad commented 10 years ago

@snoblenet - another option would be this: chad-lancour@36b6a83681a0dca9eeb87907f3de2f15579cb1cb

class Job < ActiveRecord::Base
  attr_accessible :args, :class_name, :enqueued_at, :finished_at, :jid, :name, :queue, :result, :retry, :started_at, :status if ActiveRecord::VERSION::MAJOR < 4 || Gem::Specification::find_all_by_name('protected_attributes').any?
tombenner commented 10 years ago

Fixed in 76fb1ab37c791a936e10e138e7149a05ce310b61.

thoughtchad commented 10 years ago

nice