ruby on rails - Mailer not working on column update -


i have mailer sending out email every time change column balance user via admin platform @ adminium. can change column via adminium , saves fine , changes in db email doesn't send.

user.rb

  after_update :balance_has_changed?    def balance_has_changed?     if balance_changed?       # balance       # balance_was       # send email!       usermailer.balance_changed(self, balance, balance_was).deliver     end   end    handle_asynchronously :balance_has_changed? 

usermailer

  def balance_changed(user, new_balance, old_balance)     mandrill_mail(         template: 'balance_changed',         subject: 'new earnings through bundel!',         to: { email:user.email },         vars: {             'old_balance' => old_balance,             'new_balance' => new_balance         }     )   end 

using mandrill mailchimp - template uploaded mandrill no errors side.

any brilliant.

how similar / different adminium gems such rails_admin or active_admin ? similar in purpose rails_admin , active_admin.

it different in how operates , allows different things. rails admin , active admin gems used rails 3 application whereas adminium heroku add-on can used heroku application, no matter rails version, framework or language.

it differs in way configured ; rails / active admin use dsls , require write code , deploy application modify configuration of admin, whereas configuration in adminium done via interface independently of lifecycle of target application , allowing non technical users in charge of it

this not integrate rails app , not trigger rails callbacks.

this it's doing: adminium -> database

not this: adminium -> rails -> database

https://www.adminium.io/docs

you write rails rake task checks see if column has changed , send out emails. might need cached column or something.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -