Skip to content

Commit

Permalink
Merge pull request drapergem#81 from leocassarani/master
Browse files Browse the repository at this point in the history
Remove trailing whitespace from decorator templates
  • Loading branch information
jcasimir committed Nov 30, 2011
2 parents 9edd648 + 669951b commit 69e472b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Expand Up @@ -4,24 +4,24 @@ class ApplicationDecorator < Draper::Base
# ex: number_to_currency(model.price)
# CON: Add a bazillion methods into your decorator's namespace
# and probably sacrifice performance/memory
#
#
# Enable them by uncommenting this line:
# lazy_helpers

# Shared Decorations
# Consider defining shared methods common to all your models.
#
#
# Example: standardize the formatting of timestamps
#
# def formatted_timestamp(time)
# h.content_tag :span, time.strftime("%a %m/%d/%y"),
# :class => 'timestamp'
# h.content_tag :span, time.strftime("%a %m/%d/%y"),
# :class => 'timestamp'
# end
#
#
# def created_at
# formatted_timestamp(model.created_at)
# end
#
#
# def updated_at
# formatted_timestamp(model.updated_at)
# end
Expand Down
8 changes: 4 additions & 4 deletions lib/generators/draper/decorator/templates/decorator.rb
Expand Up @@ -6,8 +6,8 @@ class <%= singular_name.camelize %>Decorator < ApplicationDecorator
#
# Normal Usage: helpers.number_to_currency(2)
# Abbreviated : h.number_to_currency(2)
#
# Or, optionally enable "lazy helpers" by include this module :
#
# Or, optionally enable "lazy helpers" by including this module:
# include Draper::LazyHelpers
# Then use the helpers with no proxy:
# number_to_currency(2)
Expand All @@ -24,9 +24,9 @@ class <%= singular_name.camelize %>Decorator < ApplicationDecorator
# Presentation Methods
# Define your own instance methods, even overriding accessors
# generated by ActiveRecord:
#
#
# def created_at
# h.content_tag :span, time.strftime("%a %m/%d/%y"),
# h.content_tag :span, time.strftime("%a %m/%d/%y"),
# :class => 'timestamp'
# end
end

0 comments on commit 69e472b

Please sign in to comment.