da-suspenders 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/bin/da-suspenders +0 -0
- data/da-suspenders.gemspec +2 -2
- data/features/running_cucumber.feature +3 -3
- data/lib/da-suspenders/version.rb +1 -1
- data/template/da-suspenders.rb +13 -5
- data/template/files/mysql_database.yml.erb +4 -4
- data/template/trout/Gemfile +3 -3
- data/template/trout/app/assets/stylesheets/application.css.scss +0 -2
- data/template/trout/config/initializers/localize_with_fallback.rb +19 -0
- data/template/trout/config/initializers/silence_asset_logging.rb +11 -0
- data/template/trout/config/locales/de.yml +173 -168
- data/template/trout/lib/templates/rails/scaffold_controller/controller.rb +46 -0
- metadata +11 -8
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 1.2.4 (2012-03-23)
|
2
|
+
* Update gem dependency to Rails 3.2.2.
|
3
|
+
* Use simple_form instead of Formtastic.
|
4
|
+
* Add localize\_with\_fallback (see initializer).
|
5
|
+
* Updated german locale to latest version from rails-i18n.
|
6
|
+
* Use mysql2 gem instead of mysql.
|
7
|
+
* Use customized template for scaffold generator.
|
8
|
+
* Add initializer to silence asset logging.
|
9
|
+
|
1
10
|
## 1.2.3 (2012-02-10)
|
2
11
|
* Updated Modernizr to v2.5.2.
|
3
12
|
* Added our fork of "trout" to the Gemfile.
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ It includes application gems like:
|
|
42
42
|
* [Compass](https://github.com/chriseppstein/compass), a [Sass-based](http://sass-lang.com/) CSS Meta-Framework
|
43
43
|
* [will_paginate](https://github.com/mislav/will_paginate/wiki/) for easy pagination
|
44
44
|
* [Paperclip](https://github.com/thoughtbot/paperclip) or [CarrierWave](https://github.com/jnicklas/carrierwave) for file uploads
|
45
|
-
* [
|
45
|
+
* [simple_form](https://github.com/plataformatec/simple_form) for better forms
|
46
46
|
* [Devise](https://github.com/plataformatec/devise) and [CanCan](https://github.com/ryanb/cancan) for authentication and authorization
|
47
47
|
* [AppConfig](https://github.com/die-antwort/app_config) for simple application configuration
|
48
48
|
* [Airbrake](https://github.com/thoughtbot/airbrake) for exception notification
|
data/bin/da-suspenders
CHANGED
File without changes
|
data/da-suspenders.gemspec
CHANGED
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.required_rubygems_version = ">= 1.3.6"
|
14
14
|
|
15
|
-
s.add_dependency('rails', '3.2.
|
16
|
-
s.add_dependency('bundler', '
|
15
|
+
s.add_dependency('rails', '3.2.2')
|
16
|
+
s.add_dependency('bundler', '>= 1.0.10')
|
17
17
|
s.add_dependency('trout', '~> 0.3')
|
18
18
|
|
19
19
|
s.add_development_dependency('rake', '~> 0.9.2')
|
@@ -20,7 +20,7 @@ Feature: Running cucumber in the generated project
|
|
20
20
|
Scenario: Stylesheets are generated correctly
|
21
21
|
Given there are no cached assets
|
22
22
|
When I visit the application stylesheet
|
23
|
-
Then it should contain the css rules from
|
23
|
+
Then it should contain the css reset rules from compass
|
24
24
|
"""
|
25
25
|
And I create a file named "features/step_definitions/test_steps.rb" with:
|
26
26
|
"""
|
@@ -36,8 +36,8 @@ Feature: Running cucumber in the generated project
|
|
36
36
|
visit "/assets/application.css"
|
37
37
|
end
|
38
38
|
|
39
|
-
Then /^it should contain the css rules from
|
40
|
-
page.should have_content "
|
39
|
+
Then /^it should contain the css reset rules from compass$/ do
|
40
|
+
page.should have_content "compass/reset"
|
41
41
|
end
|
42
42
|
"""
|
43
43
|
When I run the rake task "cucumber"
|
data/template/da-suspenders.rb
CHANGED
@@ -86,6 +86,11 @@ def update_generators_config
|
|
86
86
|
inject_into_class "config/application.rb", "Application", generators_config
|
87
87
|
end
|
88
88
|
|
89
|
+
def customize_scaffold_generator
|
90
|
+
say "Customize scaffold generator template", :yellow
|
91
|
+
trout "lib/templates/rails/scaffold_controller/controller.rb"
|
92
|
+
end
|
93
|
+
|
89
94
|
def create_application_layout_and_views
|
90
95
|
say "Creating application layout and shared views", :yellow
|
91
96
|
trout "app/views/layouts/application.html.erb"
|
@@ -100,6 +105,8 @@ end
|
|
100
105
|
def install_misc_support_files
|
101
106
|
say "Installing miscellaneous support files", :yellow
|
102
107
|
trout "config/initializers/errors.rb"
|
108
|
+
trout "config/initializers/localize_with_fallback.rb"
|
109
|
+
trout "config/initializers/silence_asset_logging.rb"
|
103
110
|
trout "app/helpers/body_class_helper.rb"
|
104
111
|
end
|
105
112
|
|
@@ -114,9 +121,9 @@ def install_compass
|
|
114
121
|
trout "app/assets/stylesheets/application.css.scss"
|
115
122
|
end
|
116
123
|
|
117
|
-
def
|
118
|
-
say "Installing
|
119
|
-
generate "
|
124
|
+
def install_simple_form
|
125
|
+
say "Installing simple_form", :yellow
|
126
|
+
generate "simple_form:install"
|
120
127
|
end
|
121
128
|
|
122
129
|
def install_javascripts
|
@@ -142,7 +149,7 @@ def cleanup
|
|
142
149
|
say "Cleaning up", :yellow
|
143
150
|
remove_file 'README'
|
144
151
|
remove_file 'public/index.html'
|
145
|
-
remove_file '
|
152
|
+
remove_file 'assets/images/rails.png'
|
146
153
|
end
|
147
154
|
|
148
155
|
create_gemfile_and_install_gems
|
@@ -152,12 +159,13 @@ setup_german_locale
|
|
152
159
|
setup_viennese_timezone
|
153
160
|
disable_timestamped_migrations unless ENV["WITH_MONGOID"]
|
154
161
|
update_generators_config
|
162
|
+
customize_scaffold_generator
|
155
163
|
create_application_layout_and_views
|
156
164
|
install_mongoid if ENV["WITH_MONGOID"]
|
157
165
|
install_misc_support_files
|
158
166
|
install_app_config
|
159
167
|
install_compass
|
160
|
-
|
168
|
+
install_simple_form
|
161
169
|
install_javascripts
|
162
170
|
install_rspec_and_cucumber
|
163
171
|
cleanup
|
@@ -1,5 +1,5 @@
|
|
1
1
|
development:
|
2
|
-
adapter:
|
2
|
+
adapter: mysql2
|
3
3
|
encoding: utf8
|
4
4
|
reconnect: false
|
5
5
|
database: <%= app_name %>_dev
|
@@ -9,7 +9,7 @@ development:
|
|
9
9
|
host: localhost
|
10
10
|
|
11
11
|
test:
|
12
|
-
adapter:
|
12
|
+
adapter: mysql2
|
13
13
|
encoding: utf8
|
14
14
|
reconnect: false
|
15
15
|
database: <%= app_name %>_test
|
@@ -19,7 +19,7 @@ test:
|
|
19
19
|
host: localhost
|
20
20
|
|
21
21
|
staging:
|
22
|
-
adapter:
|
22
|
+
adapter: mysql2
|
23
23
|
encoding: utf8
|
24
24
|
reconnect: false
|
25
25
|
database: <%= app_name %>_staging
|
@@ -29,7 +29,7 @@ staging:
|
|
29
29
|
host: localhost
|
30
30
|
|
31
31
|
production:
|
32
|
-
adapter:
|
32
|
+
adapter: mysql2
|
33
33
|
encoding: utf8
|
34
34
|
reconnect: false
|
35
35
|
database: <%= app_name %>
|
data/template/trout/Gemfile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
source :rubygems
|
2
2
|
|
3
|
-
gem "rails", "3.2.
|
3
|
+
gem "rails", "3.2.2"
|
4
4
|
gem "json"
|
5
5
|
gem "jquery-rails"
|
6
|
-
gem "
|
6
|
+
gem "mysql2"
|
7
7
|
|
8
8
|
# Gems used only for assets and not required
|
9
9
|
# in production environments by default.
|
@@ -16,7 +16,7 @@ end
|
|
16
16
|
|
17
17
|
gem "trout", :git => "git://github.com/die-antwort/trout.git"
|
18
18
|
gem "app_config", :git => "git://github.com/die-antwort/app_config.git"
|
19
|
-
gem "
|
19
|
+
gem "simple_form"
|
20
20
|
gem "airbrake"
|
21
21
|
gem "will_paginate", "~> 3.0"
|
22
22
|
gem "jquery-rails-aristo"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Make it possible to use #localize (#l) like this:
|
2
|
+
#
|
3
|
+
# "#{l @date}" # now returns an empty string if @date is nil
|
4
|
+
# <%=l @date || "n.a." %>
|
5
|
+
#
|
6
|
+
# If the given object does not respond to #strftime, we just return the object itself.
|
7
|
+
module ActionView::Helpers::TranslationHelper
|
8
|
+
|
9
|
+
def localize_with_fallback(object, options = {})
|
10
|
+
# Duplicate the check from I18n, see https://github.com/svenfuchs/i18n/blob/v0.6.0/lib/i18n/backend/base.rb#L48
|
11
|
+
return object unless object.respond_to?(:strftime)
|
12
|
+
|
13
|
+
localize_without_fallback(object, options)
|
14
|
+
end
|
15
|
+
alias :l_with_fallback :localize_with_fallback
|
16
|
+
|
17
|
+
alias_method_chain :localize, :fallback
|
18
|
+
alias_method_chain :l, :fallback
|
19
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Rails.application.assets.logger = Logger.new('/dev/null')
|
2
|
+
Rails::Rack::Logger.class_eval do
|
3
|
+
def call_with_quiet_assets(env)
|
4
|
+
previous_level = Rails.logger.level
|
5
|
+
Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0
|
6
|
+
call_without_quiet_assets(env).tap do
|
7
|
+
Rails.logger.level = previous_level
|
8
|
+
end
|
9
|
+
end
|
10
|
+
alias_method_chain :call, :quiet_assets
|
11
|
+
end
|
@@ -1,192 +1,197 @@
|
|
1
|
-
#
|
1
|
+
# Taken from https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/de-AT.yml
|
2
2
|
de:
|
3
3
|
date:
|
4
|
-
formats:
|
5
|
-
default: "%d.%m.%Y"
|
6
|
-
short: "%e. %b"
|
7
|
-
long: "%e. %B %Y"
|
8
|
-
only_day: "%e"
|
9
|
-
|
10
|
-
day_names:
|
11
|
-
- Sonntag
|
12
|
-
- Montag
|
13
|
-
- Dienstag
|
14
|
-
- Mittwoch
|
15
|
-
- Donnerstag
|
16
|
-
- Freitag
|
17
|
-
- Samstag
|
18
4
|
abbr_day_names:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
month_names:
|
27
|
-
- ~
|
28
|
-
- Jänner
|
29
|
-
- Februar
|
30
|
-
- März
|
31
|
-
- April
|
32
|
-
- Mai
|
33
|
-
- Juni
|
34
|
-
- Juli
|
35
|
-
- August
|
36
|
-
- September
|
37
|
-
- Oktober
|
38
|
-
- November
|
39
|
-
- Dezember
|
5
|
+
- So
|
6
|
+
- Mo
|
7
|
+
- Di
|
8
|
+
- Mi
|
9
|
+
- Do
|
10
|
+
- Fr
|
11
|
+
- Sa
|
40
12
|
abbr_month_names:
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
13
|
+
-
|
14
|
+
- Jän
|
15
|
+
- Feb
|
16
|
+
- Mär
|
17
|
+
- Apr
|
18
|
+
- Mai
|
19
|
+
- Jun
|
20
|
+
- Jul
|
21
|
+
- Aug
|
22
|
+
- Sep
|
23
|
+
- Okt
|
24
|
+
- Nov
|
25
|
+
- Dez
|
26
|
+
day_names:
|
27
|
+
- Sonntag
|
28
|
+
- Montag
|
29
|
+
- Dienstag
|
30
|
+
- Mittwoch
|
31
|
+
- Donnerstag
|
32
|
+
- Freitag
|
33
|
+
- Samstag
|
60
34
|
formats:
|
61
|
-
default:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
35
|
+
default: ! '%d.%m.%Y'
|
36
|
+
long: ! '%e. %B %Y'
|
37
|
+
short: ! '%e. %b'
|
38
|
+
month_names:
|
39
|
+
-
|
40
|
+
- Jänner
|
41
|
+
- Februar
|
42
|
+
- März
|
43
|
+
- April
|
44
|
+
- Mai
|
45
|
+
- Juni
|
46
|
+
- Juli
|
47
|
+
- August
|
48
|
+
- September
|
49
|
+
- Oktober
|
50
|
+
- November
|
51
|
+
- Dezember
|
52
|
+
order:
|
53
|
+
- :day
|
54
|
+
- :month
|
55
|
+
- :year
|
69
56
|
datetime:
|
70
57
|
distance_in_words:
|
71
|
-
half_a_minute: 'eine halbe Minute'
|
72
|
-
less_than_x_seconds:
|
73
|
-
one: 'weniger als eine Sekunde'
|
74
|
-
other: 'weniger als %{count} Sekunden'
|
75
|
-
x_seconds:
|
76
|
-
one: 'eine Sekunde'
|
77
|
-
other: '%{count} Sekunden'
|
78
|
-
less_than_x_minutes:
|
79
|
-
one: 'weniger als eine Minute'
|
80
|
-
other: 'weniger als %{count} Minuten'
|
81
|
-
x_minutes:
|
82
|
-
one: 'eine Minute'
|
83
|
-
other: '%{count} Minuten'
|
84
58
|
about_x_hours:
|
85
|
-
one:
|
86
|
-
other:
|
87
|
-
x_days:
|
88
|
-
one: 'ein Tag'
|
89
|
-
other: '%{count} Tage'
|
59
|
+
one: etwa eine Stunde
|
60
|
+
other: etwa %{count} Stunden
|
90
61
|
about_x_months:
|
91
|
-
one:
|
92
|
-
other:
|
93
|
-
x_months:
|
94
|
-
one: 'ein Monat'
|
95
|
-
other: '%{count} Monate'
|
96
|
-
almost_x_years:
|
97
|
-
one: 'fast ein Jahr'
|
98
|
-
other: 'fast %{count} Jahre'
|
62
|
+
one: etwa ein Monat
|
63
|
+
other: etwa %{count} Monate
|
99
64
|
about_x_years:
|
100
|
-
one:
|
101
|
-
other:
|
65
|
+
one: etwa ein Jahr
|
66
|
+
other: etwa %{count} Jahre
|
67
|
+
almost_x_years:
|
68
|
+
one: fast ein Jahr
|
69
|
+
other: fast %{count} Jahre
|
70
|
+
half_a_minute: eine halbe Minute
|
71
|
+
less_than_x_minutes:
|
72
|
+
one: weniger als eine Minute
|
73
|
+
other: weniger als %{count} Minuten
|
74
|
+
less_than_x_seconds:
|
75
|
+
one: weniger als eine Sekunde
|
76
|
+
other: weniger als %{count} Sekunden
|
102
77
|
over_x_years:
|
103
|
-
one:
|
104
|
-
other:
|
78
|
+
one: mehr als ein Jahr
|
79
|
+
other: mehr als %{count} Jahre
|
80
|
+
x_days:
|
81
|
+
one: ein Tag
|
82
|
+
other: ! '%{count} Tage'
|
83
|
+
x_minutes:
|
84
|
+
one: eine Minute
|
85
|
+
other: ! '%{count} Minuten'
|
86
|
+
x_months:
|
87
|
+
one: ein Monat
|
88
|
+
other: ! '%{count} Monate'
|
89
|
+
x_seconds:
|
90
|
+
one: eine Sekunde
|
91
|
+
other: ! '%{count} Sekunden'
|
105
92
|
prompts:
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
year:
|
112
|
-
|
93
|
+
day: Tag
|
94
|
+
hour: Stunden
|
95
|
+
minute: Minuten
|
96
|
+
month: Monat
|
97
|
+
second: Sekunden
|
98
|
+
year: Jahr
|
99
|
+
errors:
|
100
|
+
format: ! '%{attribute} %{message}'
|
101
|
+
messages:
|
102
|
+
accepted: muss akzeptiert werden
|
103
|
+
blank: muss ausgefüllt werden
|
104
|
+
confirmation: stimmt nicht mit der Bestätigung überein
|
105
|
+
empty: muss ausgefüllt werden
|
106
|
+
equal_to: muss genau %{count} sein
|
107
|
+
even: muss gerade sein
|
108
|
+
exclusion: ist nicht verfügbar
|
109
|
+
greater_than: muss größer als %{count} sein
|
110
|
+
greater_than_or_equal_to: muss größer oder gleich %{count} sein
|
111
|
+
inclusion: ist kein gültiger Wert
|
112
|
+
invalid: ist nicht gültig
|
113
|
+
less_than: muss kleiner als %{count} sein
|
114
|
+
less_than_or_equal_to: muss kleiner oder gleich %{count} sein
|
115
|
+
not_a_number: ist keine Zahl
|
116
|
+
not_an_integer: muss ganzzahlig sein
|
117
|
+
odd: muss ungerade sein
|
118
|
+
record_invalid: ! 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
|
119
|
+
taken: ist bereits vergeben
|
120
|
+
too_long: ist zu lang (nicht mehr als %{count} Zeichen)
|
121
|
+
too_short: ist zu kurz (nicht weniger als %{count} Zeichen)
|
122
|
+
wrong_length: hat die falsche Länge (muss genau %{count} Zeichen haben)
|
123
|
+
template:
|
124
|
+
body: ! 'Bitte überprüfen Sie die folgenden Felder:'
|
125
|
+
header:
|
126
|
+
one: ! 'Konnte %{model} nicht speichern: ein Fehler.'
|
127
|
+
other: ! 'Konnte %{model} nicht speichern: %{count} Fehler.'
|
128
|
+
helpers:
|
129
|
+
select:
|
130
|
+
prompt: Bitte wählen
|
131
|
+
submit:
|
132
|
+
create: ! '%{model} erstellen'
|
133
|
+
submit: ! '%{model} speichern'
|
134
|
+
update: ! '%{model} aktualisieren'
|
113
135
|
number:
|
114
|
-
format:
|
115
|
-
precision: 2
|
116
|
-
separator: ','
|
117
|
-
delimiter: '.'
|
118
136
|
currency:
|
119
137
|
format:
|
120
|
-
|
121
|
-
format: '%u %n'
|
122
|
-
separator: '.'
|
123
|
-
delimiter: ','
|
138
|
+
delimiter: .
|
139
|
+
format: ! '%u %n'
|
124
140
|
precision: 2
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
141
|
+
separator: ! ','
|
142
|
+
significant: false
|
143
|
+
strip_insignificant_zeros: false
|
144
|
+
unit: €
|
145
|
+
format:
|
146
|
+
delimiter: .
|
147
|
+
precision: 2
|
148
|
+
separator: ! ','
|
149
|
+
significant: false
|
150
|
+
strip_insignificant_zeros: false
|
131
151
|
human:
|
152
|
+
decimal_units:
|
153
|
+
format: ! '%n %u'
|
154
|
+
units:
|
155
|
+
billion:
|
156
|
+
one: Milliarde
|
157
|
+
other: Milliarden
|
158
|
+
million: Millionen
|
159
|
+
quadrillion:
|
160
|
+
one: Billiarde
|
161
|
+
other: Billiarden
|
162
|
+
thousand: Tausend
|
163
|
+
trillion: Billionen
|
164
|
+
unit: ''
|
132
165
|
format:
|
133
|
-
delimiter:
|
166
|
+
delimiter: ''
|
134
167
|
precision: 1
|
168
|
+
significant: true
|
169
|
+
strip_insignificant_zeros: true
|
135
170
|
storage_units:
|
136
|
-
|
137
|
-
# %u is the storage unit, %n is the number (default: 2 MB)
|
138
|
-
format: "%n %u"
|
171
|
+
format: ! '%n %u'
|
139
172
|
units:
|
140
173
|
byte:
|
141
|
-
one:
|
142
|
-
other:
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
tb:
|
147
|
-
|
174
|
+
one: Byte
|
175
|
+
other: Bytes
|
176
|
+
gb: GB
|
177
|
+
kb: KB
|
178
|
+
mb: MB
|
179
|
+
tb: TB
|
180
|
+
percentage:
|
181
|
+
format:
|
182
|
+
delimiter: ''
|
183
|
+
precision:
|
184
|
+
format:
|
185
|
+
delimiter: ''
|
148
186
|
support:
|
149
187
|
array:
|
150
|
-
|
151
|
-
two_words_connector:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
one: "Konnte %{model} nicht speichern: ein Fehler."
|
161
|
-
other: "Konnte %{model} nicht speichern: %{count} Fehler."
|
162
|
-
body: "Bitte überprüfen Sie die folgenden Felder:"
|
163
|
-
|
164
|
-
activerecord:
|
165
|
-
errors:
|
166
|
-
template:
|
167
|
-
header:
|
168
|
-
one: "Konnte %{model} nicht speichern: ein Fehler."
|
169
|
-
other: "Konnte %{model} nicht speichern: %{count} Fehler."
|
170
|
-
body: "Bitte überprüfen Sie die folgenden Felder:"
|
171
|
-
|
172
|
-
messages:
|
173
|
-
inclusion: "ist kein gültiger Wert"
|
174
|
-
exclusion: "ist nicht verfügbar"
|
175
|
-
invalid: "ist nicht gültig"
|
176
|
-
confirmation: "stimmt nicht mit der Bestätigung überein"
|
177
|
-
accepted: "muss akzeptiert werden"
|
178
|
-
empty: "muss ausgefüllt werden"
|
179
|
-
blank: "muss ausgefüllt werden"
|
180
|
-
too_long: "ist zu lang (nicht mehr als %{count} Zeichen)"
|
181
|
-
too_short: "ist zu kurz (nicht weniger als %{count} Zeichen)"
|
182
|
-
wrong_length: "hat die falsche Länge (muss genau %{count} Zeichen haben)"
|
183
|
-
taken: "ist bereits vergeben"
|
184
|
-
not_a_number: "ist keine Zahl"
|
185
|
-
greater_than: "muss größer als %{count} sein"
|
186
|
-
greater_than_or_equal_to: "muss größer oder gleich %{count} sein"
|
187
|
-
equal_to: "muss genau %{count} sein"
|
188
|
-
less_than: "muss kleiner als %{count} sein"
|
189
|
-
less_than_or_equal_to: "muss kleiner oder gleich %{count} sein"
|
190
|
-
odd: "muss ungerade sein"
|
191
|
-
even: "muss gerade sein"
|
192
|
-
record_invalid: "Gültigkeitsprüfung ist fehlgeschlagen: %{errors}"
|
188
|
+
last_word_connector: ! ' und '
|
189
|
+
two_words_connector: ! ' und '
|
190
|
+
words_connector: ! ', '
|
191
|
+
time:
|
192
|
+
am: vormittags
|
193
|
+
formats:
|
194
|
+
default: ! '%A, %d. %B %Y, %H:%M Uhr'
|
195
|
+
long: ! '%A, %d. %B %Y, %H:%M Uhr'
|
196
|
+
short: ! '%d. %B, %H:%M Uhr'
|
197
|
+
pm: nachmittags
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<% module_namespacing do -%>
|
2
|
+
class <%= controller_class_name %>Controller < ApplicationController
|
3
|
+
def index
|
4
|
+
@<%= plural_table_name %> = <%= orm_class.all(class_name) %>
|
5
|
+
end
|
6
|
+
|
7
|
+
def show
|
8
|
+
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
|
9
|
+
end
|
10
|
+
|
11
|
+
def new
|
12
|
+
@<%= singular_table_name %> = <%= orm_class.build(class_name) %>
|
13
|
+
end
|
14
|
+
|
15
|
+
def edit
|
16
|
+
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
|
17
|
+
end
|
18
|
+
|
19
|
+
def create
|
20
|
+
@<%= singular_table_name %> = <%= orm_class.build(class_name, "params[:#{singular_table_name}]") %>
|
21
|
+
|
22
|
+
if @<%= orm_instance.save %>
|
23
|
+
redirect_to @<%= singular_table_name %>, <%= key_value :notice, "'#{human_name} wurde erstellt.'" %>
|
24
|
+
else
|
25
|
+
render <%= key_value :action, '"new"' %>
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def update
|
30
|
+
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
|
31
|
+
|
32
|
+
if @<%= orm_instance.update_attributes("params[:#{singular_table_name}]") %>
|
33
|
+
redirect_to @<%= singular_table_name %>, <%= key_value :notice, "'#{human_name} wurde gespeichert.'" %>
|
34
|
+
else
|
35
|
+
render <%= key_value :action, '"edit"' %>
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def destroy
|
40
|
+
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
|
41
|
+
@<%= orm_instance.destroy %>
|
42
|
+
|
43
|
+
redirect_to <%= index_helper %>_url, <%= key_value :notice, "'#{human_name} wurde gelöscht.'" %>
|
44
|
+
end
|
45
|
+
end
|
46
|
+
<% end -%>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: da-suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 4
|
10
|
+
version: 1.2.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- thoughtbot
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-03-23 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - "="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 11
|
30
30
|
segments:
|
31
31
|
- 3
|
32
32
|
- 2
|
33
|
-
-
|
34
|
-
version: 3.2.
|
33
|
+
- 2
|
34
|
+
version: 3.2.2
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
hash: 3
|
46
46
|
segments:
|
@@ -143,9 +143,12 @@ files:
|
|
143
143
|
- template/trout/app/views/layouts/application.html.erb
|
144
144
|
- template/trout/app/views/shared/_flashes.html.erb
|
145
145
|
- template/trout/config/initializers/errors.rb
|
146
|
+
- template/trout/config/initializers/localize_with_fallback.rb
|
147
|
+
- template/trout/config/initializers/silence_asset_logging.rb
|
146
148
|
- template/trout/config/initializers/will_paginate.rb
|
147
149
|
- template/trout/config/locales/de.yml
|
148
150
|
- template/trout/features/step_definitions/js_steps.rb
|
151
|
+
- template/trout/lib/templates/rails/scaffold_controller/controller.rb
|
149
152
|
- template/trout/vendor/assets/javascripts/modernizr.js
|
150
153
|
homepage: http://github.com/die-antwort/da-suspenders
|
151
154
|
licenses: []
|