formtastic_date_as_string 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,11 @@
|
|
1
1
|
Formtastic::SemanticFormBuilder.class_eval do
|
2
2
|
|
3
3
|
def date_input(method, options = {})
|
4
|
-
options
|
5
|
-
options
|
4
|
+
options[:input_html] ||= {}
|
5
|
+
options[:input_html][:class] = [options[:input_html][:class], :date].compact.join ' '
|
6
|
+
options[:input_html][:value] = I18n.l(object[method]) if object[method].is_a? Date
|
7
|
+
options[:wrapper_html] ||= {}
|
8
|
+
options[:input_html][:class] = [options[:wrapper_html][:class], :date].compact.join ' '
|
6
9
|
string_input method, options
|
7
10
|
end
|
8
11
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Dmitry Lihachev
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-04-08 00:00:00 +07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|