inline_forms 0.9.12 → 0.9.13
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.
- data/VERSION +1 -1
- data/app/helpers/form_elements/dropdown.rb +3 -2
- data/inline_forms.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.13
|
|
@@ -8,10 +8,11 @@ end
|
|
|
8
8
|
|
|
9
9
|
def dropdown_edit(object, attribute)
|
|
10
10
|
object.send('build_' + attribute.to_s) unless object.send(attribute)
|
|
11
|
+
o = object.send(attribute).class.name.constantize
|
|
11
12
|
if cancan_enabled?
|
|
12
|
-
values =
|
|
13
|
+
values = o.accessible_by(current_ability).order(o.order_by_clause)
|
|
13
14
|
else
|
|
14
|
-
values =
|
|
15
|
+
values = o.order(o.order_by_clause)
|
|
15
16
|
end
|
|
16
17
|
# 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!
|
|
17
18
|
collection_select( ('_' + object.class.to_s.underscore).to_sym, attribute.to_s.foreign_key.to_sym, values, 'id', '_presentation', :selected => object.send(attribute).id)
|
data/inline_forms.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{inline_forms}
|
|
8
|
-
s.version = "0.9.
|
|
8
|
+
s.version = "0.9.13"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Ace Suares"]
|
|
12
|
-
s.date = %q{2011-06-
|
|
12
|
+
s.date = %q{2011-06-06}
|
|
13
13
|
s.description = %q{Inline Forms aims to ease the setup of forms that provide inline editing. The field list can be specified in the model.}
|
|
14
14
|
s.email = %q{ace@suares.an}
|
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inline_forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 33
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 9
|
|
9
|
-
-
|
|
10
|
-
version: 0.9.
|
|
9
|
+
- 13
|
|
10
|
+
version: 0.9.13
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Ace Suares
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-06-
|
|
18
|
+
date: 2011-06-06 00:00:00 -04:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|