added application_decorator

This commit is contained in:
Adrian Hinz 2018-04-23 10:56:00 +02:00
parent 2a5da1f6ed
commit 69d65ad96a
2 changed files with 10 additions and 0 deletions

View File

@ -42,6 +42,8 @@ gem 'acts_as_tree'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'draper'
group :development, :test do
# Call 'byebug' anywhere in the code to
# stop execution and get a debugger console

View File

@ -0,0 +1,8 @@
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