localized_scaffold 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +12 -16
- metadata +12 -6
data/README.rdoc
CHANGED
@@ -20,26 +20,22 @@ from branch "rails2".
|
|
20
20
|
|
21
21
|
Here are the steps to get a first impression about the generator:
|
22
22
|
|
23
|
-
rails foo
|
23
|
+
rails new foo
|
24
24
|
cd foo
|
25
25
|
|
26
26
|
Edit the Gemfile to include "localized_scaffold" and optionally install the
|
27
|
-
"will_paginate" gem to automatically add pagination using this library
|
28
|
-
|
29
|
-
|
27
|
+
"will_paginate" gem to automatically add pagination using this library. The
|
28
|
+
generated code uses "form.error_messages" which was moved to a separate
|
29
|
+
plugin in Rails 3 for some reason. Install that gem or implement the method
|
30
|
+
with your own code to see error messages.
|
30
31
|
|
31
32
|
vi Gemfile
|
32
33
|
gem 'localized_scaffold'
|
33
34
|
gem 'will_paginate', '>= 3.0.pre'
|
35
|
+
gem 'dynamic_form'
|
34
36
|
|
35
37
|
bundle install
|
36
38
|
|
37
|
-
The generated code uses "form.error_messages" which was moved to a separate
|
38
|
-
plugin in Rails 3 for some reason. Install the plugin or implement the method
|
39
|
-
with your own code t osee error messages:
|
40
|
-
|
41
|
-
rails plugin install git://github.com/rails/dynamic_form.git
|
42
|
-
|
43
39
|
A standard set of localization files will be installed in "config/locales" and
|
44
40
|
a set of locale files is generated per scaffold. This setup has to be
|
45
41
|
configured in the i18n configuration:
|
@@ -174,20 +170,19 @@ annoying work...
|
|
174
170
|
As a wrap up, here is a complete sample of a simple phone book only using
|
175
171
|
scaffolding:
|
176
172
|
|
177
|
-
rails phonebook
|
173
|
+
rails new phonebook
|
178
174
|
cd phonebook
|
179
175
|
|
180
176
|
vi Gemfile
|
181
177
|
gem 'localized_scaffold'
|
182
178
|
gem 'will_paginate', '>= 3.0.pre'
|
179
|
+
gem 'dynamic_form'
|
183
180
|
|
184
181
|
bundle install
|
185
182
|
|
186
183
|
rake localized_scaffold:download_locales
|
187
184
|
rake localized_scaffold:configure
|
188
185
|
|
189
|
-
rails plugin install git://github.com/rails/dynamic_form.git
|
190
|
-
|
191
186
|
vi config/application.rb
|
192
187
|
config.i18n.default_locale = :de # For example
|
193
188
|
|
@@ -224,14 +219,15 @@ the title helper for title and headline which integrates better with the
|
|
224
219
|
remaining application.
|
225
220
|
|
226
221
|
Here are the additional steps to run a localized version of devise in the
|
227
|
-
application above
|
222
|
+
application above. And be sure to have at least Rails 3.0.0.beta4 required in
|
223
|
+
your Gemfile as the newest devise version fails with prior betas...
|
228
224
|
|
229
225
|
vi Gemfile
|
230
|
-
gem 'devise', '>= 1.1.
|
226
|
+
gem 'devise', '>= 1.1.3'
|
231
227
|
|
232
228
|
bundle install
|
233
229
|
|
234
|
-
rails generate
|
230
|
+
rails generate devise:install
|
235
231
|
|
236
232
|
rails generate devise user
|
237
233
|
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localized_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 53
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
9
|
+
- 7
|
10
|
+
version: 0.9.7
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jan Ulbrich
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-11-01 00:00:00 +01:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -97,25 +98,30 @@ rdoc_options:
|
|
97
98
|
require_paths:
|
98
99
|
- .
|
99
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
none: false
|
100
102
|
requirements:
|
101
103
|
- - ">="
|
102
104
|
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
103
106
|
segments:
|
104
107
|
- 0
|
105
108
|
version: "0"
|
106
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
none: false
|
107
111
|
requirements:
|
108
112
|
- - ">="
|
109
113
|
- !ruby/object:Gem::Version
|
114
|
+
hash: 3
|
110
115
|
segments:
|
111
116
|
- 0
|
112
117
|
version: "0"
|
113
118
|
requirements: []
|
114
119
|
|
115
120
|
rubyforge_project:
|
116
|
-
rubygems_version: 1.3.
|
121
|
+
rubygems_version: 1.3.7
|
117
122
|
signing_key:
|
118
123
|
specification_version: 3
|
119
124
|
summary: Localized Rails scaffolding with style...
|
120
|
-
test_files:
|
121
|
-
|
125
|
+
test_files:
|
126
|
+
- test/localized_scaffold_test.rb
|
127
|
+
- test/test_helper.rb
|