inline_forms 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ def date_select_edit(object, attribute)
|
|
11
11
|
out = text_field_tag attribute, ( object.send(attribute).nil? ? "" : object.send(attribute).strftime("%d-%m-%Y") ), :id => css_id
|
12
12
|
out << '<SCRIPT>'.html_safe
|
13
13
|
out << "$(function() { ".html_safe
|
14
|
-
out << '$("#'.html_safe + css_id.html_safe + '").datepicker();'.html_safe
|
14
|
+
out << '$("#'.html_safe + css_id.html_safe + '").datepicker({ yearRange: "-40:+1" });'.html_safe
|
15
15
|
out << '});'.html_safe
|
16
16
|
out << '</SCRIPT>'.html_safe
|
17
17
|
return out
|
@@ -4,7 +4,7 @@ InlineForms::SPECIAL_COLUMN_TYPES[:dropdown_with_values]=:integer
|
|
4
4
|
# dropdown_with_values
|
5
5
|
def dropdown_with_values_show(object, attribute)
|
6
6
|
values = attribute_values(object, attribute)
|
7
|
-
link_to_inline_edit object, attribute, values.assoc(object.send(attribute))[1]
|
7
|
+
link_to_inline_edit object, attribute, object.send(attribute) ? values.assoc(object.send(attribute))[1] : ""
|
8
8
|
end
|
9
9
|
def dropdown_with_values_edit(object, attribute)
|
10
10
|
# the leading underscore is to avoid name conflicts, like 'email' and 'email_type' will result in 'email' and 'email[email_type_id]' in the form!
|
@@ -6,7 +6,7 @@ InlineForms::SPECIAL_COLUMN_TYPES[:radio_button]=:integer
|
|
6
6
|
|
7
7
|
def radio_button_show(object, attribute)
|
8
8
|
values = attribute_values(object, attribute)
|
9
|
-
link_to_inline_edit object, attribute,
|
9
|
+
link_to_inline_edit object, attribute, object.send(attribute) ? values.assoc(object.send(attribute))[1] : ""
|
10
10
|
end
|
11
11
|
|
12
12
|
def radio_button_edit(object, attribute)
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rvm
|