formy 0.0.1 → 0.0.2

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.
@@ -57,7 +57,11 @@ module Formy
57
57
  end
58
58
  end
59
59
 
60
-
60
+ def formy_base_error_flash
61
+ content_tag :div, :class => ['formy-base-error-flash'] do
62
+ @object.errors[:base].join ", "
63
+ end
64
+ end
61
65
  # add cancel and/or submit buttons to the form.
62
66
  # example usage:
63
67
  # formy_buttons :cancel => true, :submit => true
@@ -66,10 +70,6 @@ module Formy
66
70
  # formy_buttons :cancel => 'abandon', :submit => 'send'
67
71
  def formy_buttons buttons={}
68
72
 
69
- form_error_flash = content_tag :div, :class => ['formy-error-flash'] do
70
- @object.errors[:base].join ", "
71
- end
72
-
73
73
  ajax_loader_content = tag :img, :class => ['formy-ajax-loader'], :src => '/images/ajax-loader.gif', :alt => 'loading...'
74
74
 
75
75
  # replace the button entry in the hash with appropriate html
@@ -91,7 +91,7 @@ module Formy
91
91
  end
92
92
 
93
93
  buttons_content = content_tag :div, :class => ['formy-buttons'] do
94
- form_error_flash + ajax_loader_content + buttons[:cancel] + buttons[:submit]
94
+ formy_base_error_flash + ajax_loader_content + buttons[:cancel] + buttons[:submit]
95
95
  end
96
96
  end
97
97
  end
data/lib/formy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Formy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: formy
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sam Taylor
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-12 00:00:00 -04:00
13
+ date: 2011-05-13 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16