qm-acts-as-generic-controller 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  gemspec.email = "marcin@saepia.net"
10
10
  gemspec.homepage = "http://q.saepia.net"
11
11
  gemspec.authors = ["Marcin Lewandowski"]
12
- gemspec.version = "0.0.5"
12
+ gemspec.version = "0.0.6"
13
13
  gemspec.files = Rake::FileList.new [ "MIT-LICENSE", "Rakefile", "lib/*", "app/views/generic_controller/*" ]
14
14
  gemspec.add_dependency "qui-common-helpers", ">= 0.0.6"
15
15
  gemspec.add_dependency "rfc822"
@@ -28,7 +28,7 @@
28
28
 
29
29
  <%- elsif klass.generic_field_associations[attribute_name] -%>
30
30
  <%- if klass.generic_field_associations[attribute_name][:kind] == :belongs_to -%>
31
- <%= f.select attribute_name, options_from_collection_for_select(klass.generic_field_associations[attribute_name][:class_name].all, :id, :link_default_description, params[table_name] && params[table_name][klass.generic_field_associations[attribute_name][:foreign_key]].to_i), {}, { :name => "#{table_name}[#{klass.generic_field_associations[attribute_name][:foreign_key]}]" } %>
31
+ <%= f.select attribute_name, options_from_collection_for_select(klass.generic_field_associations[attribute_name][:class_name].all, :id, :link_default_description, params[table_name] && params[table_name][klass.generic_field_associations[attribute_name][:foreign_key]].to_i), { :include_blank => f.object.column_for_attribute(klass.generic_field_associations[attribute_name][:foreign_key]).null }, { :name => "#{table_name}[#{klass.generic_field_associations[attribute_name][:foreign_key]}]" } %>
32
32
  <%- else -%>
33
33
 
34
34
  <%- end -%>
@@ -1,5 +1,7 @@
1
1
  <%- if defined?(QUI::Toolbar) -%>
2
2
  <%- toolbar do |t| -%>
3
+ <%= t.index %>
4
+ <%= t.separator %>
3
5
  <%= t.edit %>
4
6
  <%= t.delete %>
5
7
  <%- end -%>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qm-acts-as-generic-controller
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Lewandowski