Skip to content

Instantly share code, notes, and snippets.

@workmad3
Created August 29, 2012 08:52
Show Gist options
  • Save workmad3/3508754 to your computer and use it in GitHub Desktop.
Save workmad3/3508754 to your computer and use it in GitHub Desktop.
class OtoplastikCustomer < Customer
def otoplastik?
true
end
def prices(article)
price_base = OtoplastikArticlePrice.where(otoplastik_article_id: article.id)
[id, price_group, price_list].map{|i| price_base.where(mechant_code: i)}.find(&:exists?)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment