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

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -9,9 +9,9 @@ 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.4"
12
+ gemspec.version = "0.0.5"
13
13
  gemspec.files = Rake::FileList.new [ "MIT-LICENSE", "Rakefile", "lib/*", "app/views/generic_controller/*" ]
14
- gemspec.add_dependency "qui-common-helpers", ">= 0.0.3"
14
+ gemspec.add_dependency "qui-common-helpers", ">= 0.0.6"
15
15
  gemspec.add_dependency "rfc822"
16
16
  gemspec.add_dependency "sort_alphabetical"
17
17
  end
@@ -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][attribute_name].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), {}, { :name => "#{table_name}[#{klass.generic_field_associations[attribute_name][:foreign_key]}]" } %>
32
32
  <%- else -%>
33
33
 
34
34
  <%- end -%>
@@ -1,3 +1,10 @@
1
+ <%- if defined?(QUI::Toolbar) -%>
2
+ <%- toolbar do |t| -%>
3
+ <%= t.edit %>
4
+ <%= t.delete %>
5
+ <%- end -%>
6
+ <%- end -%>
7
+
1
8
  <%- klass = @controller.class.to_s.demodulize.gsub("Controller", "").singularize.constantize -%>
2
9
  <%- table_name = "#{@controller.class.to_s.demodulize.gsub("Controller", "").tableize.singularize}" -%>
3
10
  <%- record = instance_variable_get("@#{@controller.class.to_s.demodulize.gsub("Controller", "").tableize.singularize}") -%>
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Lewandowski
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 25
29
+ hash: 19
30
30
  segments:
31
31
  - 0
32
32
  - 0
33
- - 3
34
- version: 0.0.3
33
+ - 6
34
+ version: 0.0.6
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency