hashrocket / decent_exposure

A helper for creating declarative interfaces in controllers
MIT License
1.81k stars 107 forks source link

Regression in 3.0.1 - undefined method `stringify_keys' for "subject":String #168

Closed bartoszkopinski closed 7 years ago

bartoszkopinski commented 7 years ago

Hello,

After upgrading to 3.0.1 my entire test suite starts failing. Here is a sample code + rspec error:

ReportMailer.send_report("subject", report_csv).deliver_now!
NoMethodError:
  undefined method `stringify_keys' for "subject":String
# /home/rof/cache/bundler/ruby/2.3.0/gems/decent_exposure-3.0.1/lib/decent_exposure/mailer.rb:8:in `process_action'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/base.rb:137:in `process'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionview-4.2.7.1/lib/action_view/rendering.rb:30:in `process'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/base.rb:596:in `block in process'
# /home/rof/cache/bundler/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `block in instrument'
# /home/rof/cache/bundler/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
# /home/rof/cache/bundler/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `instrument'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/base.rb:593:in `process'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/base.rb:584:in `initialize'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/message_delivery.rb:25:in `new'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/message_delivery.rb:25:in `__getobj__'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/message_delivery.rb:34:in `message'
# /home/rof/cache/bundler/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/message_delivery.rb:77:in `deliver_now!'
mattpolito commented 7 years ago

@bartoszkopinski Thanks for the update, I'll look into this.

vnegrisolo commented 7 years ago

@bartoszkopinski @mattpolito I introduced that bug 🐛 some time ago, my bad. I just created a PR to solve that, I hope that this is ok for you!

giedriusr commented 7 years ago

Is this going to be merged any time soon?

mattpolito commented 7 years ago

@giedriusr This fix has now been released.

giedriusr commented 7 years ago

Awesome, thanks 👍