inline_forms 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/app/helpers/form_elements/info.rb +11 -8
- data/lib/inline_forms/version.rb +1 -1
- metadata +1 -1
@@ -2,15 +2,18 @@
|
|
2
2
|
# not needed here, since this is only used in the views InlineForms::SPECIAL_COLUMN_TYPES[:info]=:string
|
3
3
|
|
4
4
|
def info_show(object, attribute)
|
5
|
-
|
5
|
+
# show the attribute and if it's a date/time, make it nicer.
|
6
|
+
o = object[attribute]
|
6
7
|
o = o.to_s + " (" + distance_of_time_in_words_to_now(o) + " ago )" if o.is_a?(Time)
|
7
8
|
o
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
#
|
11
|
+
def info_edit(object, attribute)
|
12
|
+
# just show the attribute.
|
13
|
+
object[attribute]
|
14
|
+
end
|
15
|
+
|
16
|
+
def info_update(object, attribute)
|
17
|
+
# do absolutely nothing
|
18
|
+
end
|
19
|
+
|
data/lib/inline_forms/version.rb
CHANGED