Joined February 2013
·

Danil Pismenny

BrandyMint
·
Cheboksary, Russia
·
·
·

What is a reason to make consumer public accessed to write and read?

method_missing is not so good practice. If you don't want extra methods then don't use class and instance.

module MyVouchers
  def for_display consumer
    self.consumer.vouchers.joins(:partners)
    .where(["partners.business_name != ?)", Partner::LEGO])
  end

Usage:

MyVouchers.for_display(consumer)
Achievements
79 Karma
0 Total ProTip Views