r_decorator 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,32 +2,8 @@
|
|
2
2
|
class <%= class_name %>Decorator < <%= parent_class_name %>
|
3
3
|
|
4
4
|
# Accessing Helpers
|
5
|
-
# You can access any helper
|
6
|
-
#
|
7
|
-
# Normal Usage: helpers.number_to_currency(2)
|
8
|
-
# Abbreviated : h.number_to_currency(2)
|
9
|
-
#
|
10
|
-
# Or, optionally enable "lazy helpers" by including this module:
|
11
|
-
# include Draper::LazyHelpers
|
12
|
-
# Then use the helpers with no proxy:
|
5
|
+
# You can access any helper
|
13
6
|
# number_to_currency(2)
|
14
|
-
|
15
|
-
# Defining an Interface
|
16
|
-
# Control access to the wrapped subject's methods using one of the following:
|
17
|
-
#
|
18
|
-
# To allow only the listed methods (whitelist):
|
19
|
-
# allows :method1, :method2
|
20
|
-
#
|
21
|
-
# To allow everything except the listed methods (blacklist):
|
22
|
-
# denies :method1, :method2
|
23
|
-
|
24
|
-
# Presentation Methods
|
25
|
-
# Define your own instance methods, even overriding accessors
|
26
|
-
# generated by ActiveRecord:
|
27
|
-
#
|
28
|
-
# def created_at
|
29
|
-
# h.content_tag :span, attributes["created_at"].strftime("%a %m/%d/%y"),
|
30
|
-
# :class => 'timestamp'
|
31
|
-
# end
|
7
|
+
|
32
8
|
end
|
33
9
|
<% end -%>
|
data/lib/r_decorator/version.rb
CHANGED