foundation_rails_helper 0.2 → 0.2.1

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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
1
  ## Version 0.1.rc
2
2
 
3
- * initial release candidate (Jan 15th, 2012)
3
+ * initial release candidate (Jan 14th, 2012)
4
+
5
+ ## Version 0.2.1
6
+
7
+ * First production release (Jan 14th, 2012)
8
+
data/README.md CHANGED
@@ -16,6 +16,7 @@ I use this gem only been with Rails 3.1 and ruby 1.9.2. It should work for Rails
16
16
 
17
17
  ## Screenshots
18
18
 
19
+ ### Forms
19
20
  A classic devise sign up views will look like this:
20
21
 
21
22
  ```erb
@@ -24,17 +25,21 @@ A classic devise sign up views will look like this:
24
25
  <%= f.password_field :password %>
25
26
  <%= f.password_field :password_confirmation %>
26
27
 
27
- <%= f.submit "S'enregistrer" %>
28
+ <%= f.submit %>
28
29
  <% end %>
29
30
  ```
30
-
31
- ![Sign-up](http://dl.dropbox.com/u/517768/sign-up.png "Sign-up")
32
-
33
- With errors
34
-
35
- ![Sign-up-with-errors](http://dl.dropbox.com/u/517768/sign-up-with-errors.png "Sign-up-with-errors")
36
-
37
- And success flash message will be display like that:
31
+ <table>
32
+ <tr>
33
+ <th>Form</th>
34
+ <th>Form with errors</th>
35
+ </tr>
36
+ <tr>
37
+ <td valign='top'> <img src="http://dl.dropbox.com/u/517768/sign-up.png"/></td>
38
+ <td valign='top'> <img src="http://dl.dropbox.com/u/517768/sign-up-with-errors.png"/></td>
39
+ </tr>
40
+ </table>
41
+
42
+ ### Flash messages
38
43
 
39
44
  ![Flash-message](http://dl.dropbox.com/u/517768/flash.png "Flash-message")
40
45
 
@@ -60,6 +65,11 @@ To get access to `display_flash_messages` in your views add in your `app/helpers
60
65
  include FoundationRailsHelper::FlashHelper
61
66
  ```
62
67
 
68
+ ## TODO
69
+
70
+ * Handle more UI components
71
+ * Make somehting for ajax forms
72
+
63
73
  ## Contributing
64
74
 
65
75
  1. Fork it
@@ -2,14 +2,14 @@ module ActionView
2
2
  module Helpers
3
3
  module FormHelper
4
4
  def form_for_with_foundation(record, options = {}, &block)
5
- options[:builder] = FoundationRailsHelper::FormBuilder
5
+ options[:builder] ||= FoundationRailsHelper::FormBuilder
6
6
  options[:html] ||= {}
7
7
  options[:html][:class] ||= 'nice'
8
8
  form_for_without_foundation(record, options, &block)
9
9
  end
10
10
 
11
11
  def fields_for_with_foundation(record_name, record_object = nil, options = {}, &block)
12
- options[:builder] = FoundationRailsHelper::FormBuilder
12
+ options[:builder] ||= FoundationRailsHelper::FormBuilder
13
13
  options[:html] ||= {}
14
14
  options[:html][:class] ||= 'nice'
15
15
  fields_for_without_foundation(record_name, record_object, options, &block)
@@ -1,3 +1,3 @@
1
1
  module FoundationRailsHelper
2
- VERSION = "0.2"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foundation_rails_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70259635091520 !ruby/object:Gem::Requirement
16
+ requirement: &70200733481280 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70259635091520
24
+ version_requirements: *70200733481280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: actionpack
27
- requirement: &70259635091000 !ruby/object:Gem::Requirement
27
+ requirement: &70200733480760 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70259635091000
35
+ version_requirements: *70200733480760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec-rails
38
- requirement: &70259635090620 !ruby/object:Gem::Requirement
38
+ requirement: &70200733480380 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70259635090620
46
+ version_requirements: *70200733480380
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: capybara
49
- requirement: &70259635017960 !ruby/object:Gem::Requirement
49
+ requirement: &70200733407720 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70259635017960
57
+ version_requirements: *70200733407720
58
58
  description: Rails 3 for zurb foundation CSS framework. Form builder, flash message,
59
59
  ...
60
60
  email: