inline_forms 2.2 → 2.21

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.
@@ -28,20 +28,30 @@
28
28
  <% attributes.each do | attribute, name, form_element | -%>
29
29
  <% unless form_element.to_sym == :associated || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute)) -%>
30
30
  <% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
31
- <tr>
32
- <td valign="top" class="<%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
33
- <div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
34
- <%= @object.class.human_attribute_name(attribute) -%>
35
- </div>
36
- </td>
37
- <td valign="top">
38
- <div class='<%= "attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
39
- <span id="<%= css_class_id -%>" >
40
- <%= send("#{form_element}_edit", @object, attribute) -%>
41
- </span>
42
- </div>
43
- </td>
44
- </tr>
31
+ <% if form_element == :header %>
32
+ <tr>
33
+ <td valign="top" class="header" colspan="2">
34
+ <div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
35
+ <%= @object.class.human_attribute_name(attribute) -%>
36
+ </div>
37
+ </td>
38
+ </tr>
39
+ <% else %>
40
+ <tr>
41
+ <td valign="top" class="<%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
42
+ <div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
43
+ <%= @object.class.human_attribute_name(attribute) -%>
44
+ </div>
45
+ </td>
46
+ <td valign="top">
47
+ <div class='<%= "attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
48
+ <span id="<%= css_class_id -%>" >
49
+ <%= send("#{form_element}_edit", @object, attribute) -%>
50
+ </span>
51
+ </div>
52
+ </td>
53
+ </tr>
54
+ <% end -%>
45
55
  <% end -%>
46
56
  <% end -%>
47
57
  </table>
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "2.2"
3
+ VERSION = "2.21"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.2'
4
+ version: '2.21'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-23 00:00:00.000000000 Z
12
+ date: 2013-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rvm