hydra-editor 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8548a8eda2d9fc06a8a856275d4610f79a6a159
4
- data.tar.gz: 74bed61b47ce88f4cf4b4d601c46df6b9ba972c4
3
+ metadata.gz: 40c54c60fa466099585ec373927a14fbc83d17c7
4
+ data.tar.gz: ab0643c8a07d1d780d045f167ecd9304b7d134e6
5
5
  SHA512:
6
- metadata.gz: 8a59bb816d6aac380ed5f73c1b3d79672686deef24b9ccd75609aacc859b0974c9f6e18e5843b5c691e83e185d709ff54f9e64eecf4c6f0f1f827ee9fb725a39
7
- data.tar.gz: c8b543b961f033546dec185f6201892188381d2a634c8ebd5539d0abfac3dcaa33a6c261a7a479e0a7d544bba98628d97a688d3aef185f9324131f60669522bf
6
+ metadata.gz: cd8ca43480d157b920f86c390517172976069ea1b18a555a1a8ad86a5cf9ae2a08c4cd809280eed26b5c161fdf3ace0e32da75f55e49c3ba21eb3314416c9e9c
7
+ data.tar.gz: 68bed805ad1e646b1dbb4778672b8ac4e76642dbc52d792a3761eb4e649a679251ee04dec7ad73c9ac215597779376afb2e888caaf0fd52330f0f5f3bb52cd62
@@ -58,7 +58,7 @@ module RecordsControllerBehavior
58
58
 
59
59
  # Override this method if you want to set different metadata on the object
60
60
  def set_attributes
61
- @record.attributes = params[@record.class.model_name.underscore]
61
+ @record.attributes = params[ActiveModel::Naming.singular(@record)]
62
62
  end
63
63
 
64
64
 
@@ -1,6 +1,6 @@
1
1
  <div class="controls" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
2
2
  <% required = render_req && (index == 0) && f.object.required?(key) %>
3
- <%= text_field_tag "#{f.object.class.model_name.underscore}[#{key.to_s}][]", v, :id => "#{f.object.class.model_name.underscore}_#{key.to_s}", :class => "input-large", :required => required %>
3
+ <%= text_field_tag "#{ActiveModel::Naming.singular(f.object)}[#{key.to_s}][]", v, :id => "#{ActiveModel::Naming.singular(f.object)}_#{key.to_s}", :class => "input-large", :required => required %>
4
4
  <% unless f.object.class.unique?(key) %>
5
5
  <%= render :partial=>"records/edit_fields/suffix", :locals=>{key: key, index: index} %>
6
6
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module HydraEditor
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne