formize 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -8,12 +8,12 @@ Add to your Gemfile these fllowing lines:
8
8
  gem "jquery-rails" # Need to be explicitly specified
9
9
  gem "formize"
10
10
 
11
- == Assets incorporation (JavaScripts and Stylesheets)
11
+ == Assets and configurations
12
12
  Formize comes with basic scripts and stylesheets which must be included in the layout (at least at the start).
13
13
 
14
14
  === In Rails 3.0.x
15
15
  Formize requires the gem +jquery-rails+, so if you don't already use it:
16
- rails generate jquery:install
16
+ rails generate jquery:install --ui
17
17
 
18
18
  Then install +formize+ in your app like +jquery-rails+:
19
19
  rails generate formize:install
@@ -32,8 +32,11 @@ And for javascripts:
32
32
  # app/assets/javascripts/application.js
33
33
  *= require formize
34
34
 
35
- == Usage
35
+ ==== Default configuration file
36
+ To install the default configuration file (config/initializers/formize.rb), the generator must be run:
37
+ rails generate formize:install
36
38
 
39
+ == Usage
37
40
 
38
41
  In controller:
39
42
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
1
+ 0.0.12
@@ -60,6 +60,3 @@ module Formize
60
60
  end
61
61
 
62
62
  end
63
-
64
- # require 'action_controller'
65
- # ActionController::Base.send(:include, Formize::ActionController)
@@ -12,18 +12,22 @@ module Formize
12
12
  # <%= formize_include_tag :locale=>:jp -%>
13
13
  #
14
14
  # @option options [Symbol, String] :locale
15
- # Select locale file to use for jQuery UI datepickers. The locale must be specified using 2 or 5 characters, like `:en` or `"en-GB"`. By default, `I18n.locale` is used to determine the current locale.
15
+ # Select locale file to use for jQuery UI datepickers. The locale must be
16
+ # specified using 2 or 5 characters, like `:en` or `"en-GB"`.
17
+ # By default, `I18n.locale` is used to determine the current locale.
16
18
  #
17
19
  # @option options [TrueClass, FalseClass] :skip_stylesheet
18
20
  # Skip the inclusion of default stylesheet: formize.css
19
21
  def formize_include_tag(options={})
20
22
  options[:locale] ||= ::I18n.locale
21
23
  html = ""
22
- html << javascript_include_tag('jquery.ui.formize')
24
+ html << javascript_include_tag('jquery.ui.formize') if options[:special_ui]
23
25
  html << javascript_include_tag('locales/jquery.ui.datepicker-' + locale.to_s)
24
26
  html << javascript_include_tag('formize')
25
- html << stylesheet_link_tag('jquery-ui')
26
- html << stylesheet_link_tag('formize') unless options[:skip_stylesheet]
27
+ unless options[:skip_stylesheet]
28
+ html << stylesheet_link_tag('jquery-ui')
29
+ html << stylesheet_link_tag('formize')
30
+ end
27
31
  return html.html_safe
28
32
  end
29
33
 
data/lib/formize.rb CHANGED
@@ -1,6 +1,3 @@
1
- # require 'rubygems'
2
- # require 'bundler/setup'
3
- # require 'active_support'
4
1
  require 'formize/railtie' if defined?(::Rails)
5
2
  require 'formize/engine' if defined?(::Rails)
6
3
 
@@ -46,6 +43,3 @@ module Formize
46
43
  autoload :ActionController
47
44
  autoload :Generator
48
45
  end
49
-
50
- # require 'action_view'
51
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-02 00:00:00.000000000Z
12
+ date: 2011-09-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &20533840 !ruby/object:Gem::Requirement
16
+ requirement: &8400960 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *20533840
24
+ version_requirements: *8400960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jquery-rails
27
- requirement: &20526760 !ruby/object:Gem::Requirement
27
+ requirement: &8376420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *20526760
35
+ version_requirements: *8376420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: fastercsv
38
- requirement: &20523700 !ruby/object:Gem::Requirement
38
+ requirement: &8373140 !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: :runtime
45
45
  prerelease: false
46
- version_requirements: *20523700
46
+ version_requirements: *8373140
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &20521280 !ruby/object:Gem::Requirement
49
+ requirement: &8354560 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.6.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *20521280
57
+ version_requirements: *8354560
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rcov
60
- requirement: &20510960 !ruby/object:Gem::Requirement
60
+ requirement: &8349740 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *20510960
68
+ version_requirements: *8349740
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdoc
71
- requirement: &20509960 !ruby/object:Gem::Requirement
71
+ requirement: &8346560 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: 2.4.2
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *20509960
79
+ version_requirements: *8346560
80
80
  description: Like simple_form or formtastic, it aims to handle easily forms but taking
81
81
  in account AJAX and HTML5 on depending fields mainly.
82
82
  email: brice.texier@ekylibre.org
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  version: '0'
199
199
  requirements: []
200
200
  rubyforge_project:
201
- rubygems_version: 1.8.6
201
+ rubygems_version: 1.8.7
202
202
  signing_key:
203
203
  specification_version: 3
204
204
  summary: Simple form DSL with dynamic interactions for Rails