Skip to content

Instantly share code, notes, and snippets.

@francirp
Created August 8, 2016 16:20
Show Gist options
  • Save francirp/e4aed84e2562881bcec67cacdd49808a to your computer and use it in GitHub Desktop.
Save francirp/e4aed84e2562881bcec67cacdd49808a to your computer and use it in GitHub Desktop.
Decorators Codeblock 12
class CompanyDecorator < BaseDecorator
  delegate_all

  def budget
    h.number_with_precision(object.budget, precision: 2)
  end

  def display_budget
    h.number_to_currency(object.budget, precision: 0)
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment