I'm not sure this is a sucker punch thing or a Rails thing. Rails should reload all classes under the app folder and I have an app/jobs folder. I can't get changes in a job class to reload across a request.
I have a class
class DeviseEmailJob
include SuckerPunch::Job
def perform(notification, user_id, opts)
ActiveRecord::Base.connection_pool.with_connection do
user = User.find(user_id)
Devise.mailer.send(notification, user, opts).deliver
end
end
end
Then in my user.rb
def send_devise_notification(notification, opts={})
DeviseEmailJob.new.async.perform(notification, self.id, opts)
end
Now if I make a change in DeviseEmailJob I have to stop and start rails for it to see it. Simply reloading the page doesn't do anything.
I'm not sure this is a sucker punch thing or a Rails thing. Rails should reload all classes under the app folder and I have an app/jobs folder. I can't get changes in a job class to reload across a request.
I have a class
Then in my user.rb
Now if I make a change in DeviseEmailJob I have to stop and start rails for it to see it. Simply reloading the page doesn't do anything.
Thanks for any help!