drapergem/draper

View on GitHub
lib/generators/draper/templates/application_decorator.rb

Summary

Maintainability
A
0 mins
Test Coverage
class ApplicationDecorator < Draper::Decorator
  # Define methods for all decorated objects.
  # Helpers are accessed through `helpers` (aka `h`). For example:
  #
  #   def percent_amount
  #     h.number_to_percentage object.amount, precision: 2
  #   end
end