inline_forms 0.9.12 → 0.9.13

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.12
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 = object.send(attribute).class.name.constantize.accessible_by(current_ability).order(attribute.to_s.singularize.camelcase.constantize.order_by_clause)
13
+ values = o.accessible_by(current_ability).order(o.order_by_clause)
13
14
  else
14
- values = object.send(attribute).class.name.constantize.order(attribute.to_s.singularize.camelcase.constantize.order_by_clause)
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)
@@ -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.12"
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-04}
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: 35
4
+ hash: 33
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 12
10
- version: 0.9.12
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-04 00:00:00 -04:00
18
+ date: 2011-06-06 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency