dynamic_fields_for_rails 0.6.1 → 1.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.
- checksums.yaml +5 -5
- data/README.md +0 -1
- data/Rakefile +2 -0
- data/app/helpers/dynamic_fields_for_helper.rb +14 -9
- data/lib/dynamic_fields_for_rails/version.rb +3 -1
- data/lib/dynamic_fields_for_rails.rb +7 -3
- metadata +9 -168
- data/.gitignore +0 -18
- data/.travis.yml +0 -5
- data/Gemfile +0 -4
- data/dynamic_fields_for_rails.gemspec +0 -27
- data/test/config/active_record.rb +0 -10
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/models/child.rb +0 -2
- data/test/dummy/app/models/parent.rb +0 -4
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/app/views/parents/_child_fields.html.erb +0 -0
- data/test/dummy/app/views/parents/form.html.erb +0 -1
- data/test/dummy/config/application.rb +0 -41
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/database.yml +0 -22
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -24
- data/test/dummy/config/environments/production.rb +0 -50
- data/test/dummy/config/environments/test.rb +0 -33
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -8
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -59
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130423140255_create_parents.rb +0 -5
- data/test/dummy/db/migrate/20130423140307_create_children.rb +0 -8
- data/test/dummy/db/schema.rb +0 -25
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -8
- data/test/dummy/log/production.log +0 -0
- data/test/dummy/log/server.log +0 -0
- data/test/dummy/log/test.log +0 -1353
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -26
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/javascripts/application.js +0 -2
- data/test/dummy/public/javascripts/controls.js +0 -965
- data/test/dummy/public/javascripts/dragdrop.js +0 -974
- data/test/dummy/public/javascripts/effects.js +0 -1123
- data/test/dummy/public/javascripts/prototype.js +0 -6001
- data/test/dummy/public/javascripts/rails.js +0 -202
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/dummy/script/rails +0 -6
- data/test/dynamic_fields_for_helper_test.rb +0 -7
- data/test/link_to_add_fields_test.rb +0 -34
- data/test/link_to_delete_fields_test.rb +0 -40
- data/test/test_helper.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5dd2e8387b7e122c29371ea76f22af9e30336790336aa1f7a9ed2ec6f4824152
|
4
|
+
data.tar.gz: 7a2fa3c5abac57789c139b0ef830310568c11c3cd21f38b3cfc4be8d13fa96d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0aa78afe2c8bfa0bd636ce966a2ab4eb7287ca7276b72c394fb8fee6c3a3f7f757e57fe53b91b2fe96c7602e0e3a4e74ca21eaf17204e7918597b273da047a3
|
7
|
+
data.tar.gz: 0f6ab301048a7ebc0ae0dece464b7e5d395c8aebf5d4e44073dc02d8dfa978147826403681dabf34301d582eb9b8aac3ac552baa6749210c325118b8ad7e814f
|
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# DynamicFieldsForRails
|
2
|
-
[](https://travis-ci.org/mortik/dynamic_fields_for_rails)
|
3
2
|
[](http://badge.fury.io/rb/dynamic_fields_for_rails)
|
4
3
|
[](https://gemnasium.com/mortik/dynamic_fields_for_rails)
|
5
4
|
|
data/Rakefile
CHANGED
@@ -1,21 +1,24 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module DynamicFieldsForHelper
|
3
4
|
def link_to_add_fields(form, association, options = {}, &block)
|
4
5
|
partial = options[:partial] || nil
|
5
6
|
name = options[:name] || nil
|
6
7
|
css_classes = options[:class] || nil
|
7
8
|
target = options[:target] || nil
|
8
|
-
|
9
9
|
new_object = form.object.send(association).klass.new
|
10
10
|
id = new_object.object_id
|
11
|
+
|
11
12
|
fields = form.fields_for(association, new_object, child_index: id) do |builder|
|
12
13
|
if partial
|
13
|
-
render("#{form.object.class.name.
|
14
|
+
render("#{form.object.class.name.underscore.pluralize}/#{partial}", fields: builder)
|
14
15
|
else
|
15
|
-
render("#{form.object.class.name.
|
16
|
+
render("#{form.object.class.name.underscore.pluralize}/#{association.to_s.singularize}_fields", fields: builder)
|
16
17
|
end
|
17
18
|
end
|
19
|
+
|
18
20
|
css_classes = css_classes(DynamicFieldsForRails.add_css_classes, css_classes)
|
21
|
+
|
19
22
|
if block_given?
|
20
23
|
link_to('#', class: css_classes, data: { id: id, fields: fields.delete("\n"), target: target }, &block)
|
21
24
|
else
|
@@ -30,20 +33,22 @@ module DynamicFieldsForHelper
|
|
30
33
|
link = []
|
31
34
|
link << fields.hidden_field(:_destroy) unless fields.object.new_record?
|
32
35
|
css_classes = css_classes(DynamicFieldsForRails.delete_css_classes, css_classes)
|
36
|
+
|
33
37
|
link << if block_given?
|
34
38
|
link_to('#', class: css_classes, title: name, &block)
|
35
39
|
else
|
36
40
|
link_to(name, '#', class: css_classes)
|
37
41
|
end
|
42
|
+
|
43
|
+
# rubocop:disable Rails/OutputSafety
|
38
44
|
link.join('').html_safe
|
45
|
+
# rubocop:enable Rails/OutputSafety
|
39
46
|
end
|
40
47
|
|
41
|
-
protected
|
42
|
-
|
43
|
-
def css_classes(default, css_class)
|
48
|
+
protected def css_classes(default, css_class)
|
44
49
|
style_class = []
|
45
|
-
style_class << default
|
46
|
-
style_class << css_class
|
50
|
+
style_class << default if default.present?
|
51
|
+
style_class << css_class if css_class.present?
|
47
52
|
style_class.join(' ')
|
48
53
|
end
|
49
54
|
end
|
@@ -1,16 +1,20 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'dynamic_fields_for_rails/version'
|
4
|
+
|
5
|
+
# rubocop:disable Style/ClassVars
|
3
6
|
module DynamicFieldsForRails
|
4
7
|
class Engine < Rails::Engine
|
5
8
|
end
|
6
9
|
|
7
10
|
mattr_accessor :add_css_classes
|
8
|
-
@@add_css_classes =
|
11
|
+
@@add_css_classes = 'add_fields'
|
9
12
|
|
10
13
|
mattr_accessor :delete_css_classes
|
11
|
-
@@delete_css_classes =
|
14
|
+
@@delete_css_classes = 'remove_fields'
|
12
15
|
|
13
16
|
def self.setup
|
14
17
|
yield self
|
15
18
|
end
|
16
19
|
end
|
20
|
+
# rubocop:enable Style/ClassVars
|
metadata
CHANGED
@@ -1,71 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_fields_for_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Klitzke
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.3'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.3'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: mocha
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: sqlite3
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
13
|
- !ruby/object:Gem::Dependency
|
70
14
|
name: rails
|
71
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +19,7 @@ dependencies:
|
|
75
19
|
version: 3.0.0
|
76
20
|
- - "<"
|
77
21
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
22
|
+
version: 8.0.0
|
79
23
|
type: :runtime
|
80
24
|
prerelease: false
|
81
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -85,7 +29,7 @@ dependencies:
|
|
85
29
|
version: 3.0.0
|
86
30
|
- - "<"
|
87
31
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
32
|
+
version: 8.0.0
|
89
33
|
description: Dynamic fields helper for Rails.
|
90
34
|
email:
|
91
35
|
- m.klitzke@gmail.com
|
@@ -93,71 +37,18 @@ executables: []
|
|
93
37
|
extensions: []
|
94
38
|
extra_rdoc_files: []
|
95
39
|
files:
|
96
|
-
- ".gitignore"
|
97
|
-
- ".travis.yml"
|
98
|
-
- Gemfile
|
99
40
|
- LICENSE.txt
|
100
41
|
- README.md
|
101
42
|
- Rakefile
|
102
43
|
- app/assets/javascripts/dynamic_fields_for.coffee
|
103
44
|
- app/helpers/dynamic_fields_for_helper.rb
|
104
|
-
- dynamic_fields_for_rails.gemspec
|
105
45
|
- lib/dynamic_fields_for_rails.rb
|
106
46
|
- lib/dynamic_fields_for_rails/version.rb
|
107
|
-
- test/config/active_record.rb
|
108
|
-
- test/dummy/Rakefile
|
109
|
-
- test/dummy/app/controllers/application_controller.rb
|
110
|
-
- test/dummy/app/helpers/application_helper.rb
|
111
|
-
- test/dummy/app/models/child.rb
|
112
|
-
- test/dummy/app/models/parent.rb
|
113
|
-
- test/dummy/app/views/layouts/application.html.erb
|
114
|
-
- test/dummy/app/views/parents/_child_fields.html.erb
|
115
|
-
- test/dummy/app/views/parents/form.html.erb
|
116
|
-
- test/dummy/config.ru
|
117
|
-
- test/dummy/config/application.rb
|
118
|
-
- test/dummy/config/boot.rb
|
119
|
-
- test/dummy/config/database.yml
|
120
|
-
- test/dummy/config/environment.rb
|
121
|
-
- test/dummy/config/environments/development.rb
|
122
|
-
- test/dummy/config/environments/production.rb
|
123
|
-
- test/dummy/config/environments/test.rb
|
124
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
125
|
-
- test/dummy/config/initializers/inflections.rb
|
126
|
-
- test/dummy/config/initializers/mime_types.rb
|
127
|
-
- test/dummy/config/initializers/secret_token.rb
|
128
|
-
- test/dummy/config/initializers/session_store.rb
|
129
|
-
- test/dummy/config/locales/en.yml
|
130
|
-
- test/dummy/config/routes.rb
|
131
|
-
- test/dummy/db/development.sqlite3
|
132
|
-
- test/dummy/db/migrate/20130423140255_create_parents.rb
|
133
|
-
- test/dummy/db/migrate/20130423140307_create_children.rb
|
134
|
-
- test/dummy/db/schema.rb
|
135
|
-
- test/dummy/db/test.sqlite3
|
136
|
-
- test/dummy/log/development.log
|
137
|
-
- test/dummy/log/production.log
|
138
|
-
- test/dummy/log/server.log
|
139
|
-
- test/dummy/log/test.log
|
140
|
-
- test/dummy/public/404.html
|
141
|
-
- test/dummy/public/422.html
|
142
|
-
- test/dummy/public/500.html
|
143
|
-
- test/dummy/public/favicon.ico
|
144
|
-
- test/dummy/public/javascripts/application.js
|
145
|
-
- test/dummy/public/javascripts/controls.js
|
146
|
-
- test/dummy/public/javascripts/dragdrop.js
|
147
|
-
- test/dummy/public/javascripts/effects.js
|
148
|
-
- test/dummy/public/javascripts/prototype.js
|
149
|
-
- test/dummy/public/javascripts/rails.js
|
150
|
-
- test/dummy/public/stylesheets/.gitkeep
|
151
|
-
- test/dummy/script/rails
|
152
|
-
- test/dynamic_fields_for_helper_test.rb
|
153
|
-
- test/link_to_add_fields_test.rb
|
154
|
-
- test/link_to_delete_fields_test.rb
|
155
|
-
- test/test_helper.rb
|
156
47
|
homepage: https://github.com/mortik/dynamic_fields_for_rails
|
157
48
|
licenses:
|
158
49
|
- MIT
|
159
50
|
metadata: {}
|
160
|
-
post_install_message:
|
51
|
+
post_install_message:
|
161
52
|
rdoc_options: []
|
162
53
|
require_paths:
|
163
54
|
- lib
|
@@ -172,58 +63,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
63
|
- !ruby/object:Gem::Version
|
173
64
|
version: '0'
|
174
65
|
requirements: []
|
175
|
-
|
176
|
-
|
177
|
-
signing_key:
|
66
|
+
rubygems_version: 3.2.15
|
67
|
+
signing_key:
|
178
68
|
specification_version: 4
|
179
69
|
summary: Helper for nested forms with dynamic fields.
|
180
|
-
test_files:
|
181
|
-
- test/config/active_record.rb
|
182
|
-
- test/dummy/Rakefile
|
183
|
-
- test/dummy/app/controllers/application_controller.rb
|
184
|
-
- test/dummy/app/helpers/application_helper.rb
|
185
|
-
- test/dummy/app/models/child.rb
|
186
|
-
- test/dummy/app/models/parent.rb
|
187
|
-
- test/dummy/app/views/layouts/application.html.erb
|
188
|
-
- test/dummy/app/views/parents/_child_fields.html.erb
|
189
|
-
- test/dummy/app/views/parents/form.html.erb
|
190
|
-
- test/dummy/config.ru
|
191
|
-
- test/dummy/config/application.rb
|
192
|
-
- test/dummy/config/boot.rb
|
193
|
-
- test/dummy/config/database.yml
|
194
|
-
- test/dummy/config/environment.rb
|
195
|
-
- test/dummy/config/environments/development.rb
|
196
|
-
- test/dummy/config/environments/production.rb
|
197
|
-
- test/dummy/config/environments/test.rb
|
198
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
199
|
-
- test/dummy/config/initializers/inflections.rb
|
200
|
-
- test/dummy/config/initializers/mime_types.rb
|
201
|
-
- test/dummy/config/initializers/secret_token.rb
|
202
|
-
- test/dummy/config/initializers/session_store.rb
|
203
|
-
- test/dummy/config/locales/en.yml
|
204
|
-
- test/dummy/config/routes.rb
|
205
|
-
- test/dummy/db/development.sqlite3
|
206
|
-
- test/dummy/db/migrate/20130423140255_create_parents.rb
|
207
|
-
- test/dummy/db/migrate/20130423140307_create_children.rb
|
208
|
-
- test/dummy/db/schema.rb
|
209
|
-
- test/dummy/db/test.sqlite3
|
210
|
-
- test/dummy/log/development.log
|
211
|
-
- test/dummy/log/production.log
|
212
|
-
- test/dummy/log/server.log
|
213
|
-
- test/dummy/log/test.log
|
214
|
-
- test/dummy/public/404.html
|
215
|
-
- test/dummy/public/422.html
|
216
|
-
- test/dummy/public/500.html
|
217
|
-
- test/dummy/public/favicon.ico
|
218
|
-
- test/dummy/public/javascripts/application.js
|
219
|
-
- test/dummy/public/javascripts/controls.js
|
220
|
-
- test/dummy/public/javascripts/dragdrop.js
|
221
|
-
- test/dummy/public/javascripts/effects.js
|
222
|
-
- test/dummy/public/javascripts/prototype.js
|
223
|
-
- test/dummy/public/javascripts/rails.js
|
224
|
-
- test/dummy/public/stylesheets/.gitkeep
|
225
|
-
- test/dummy/script/rails
|
226
|
-
- test/dynamic_fields_for_helper_test.rb
|
227
|
-
- test/link_to_add_fields_test.rb
|
228
|
-
- test/link_to_delete_fields_test.rb
|
229
|
-
- test/test_helper.rb
|
70
|
+
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'dynamic_fields_for_rails/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "dynamic_fields_for_rails"
|
8
|
-
spec.version = DynamicFieldsForRails::VERSION
|
9
|
-
spec.authors = ["Marten Klitzke"]
|
10
|
-
spec.email = ["m.klitzke@gmail.com"]
|
11
|
-
spec.description = 'Dynamic fields helper for Rails.'
|
12
|
-
spec.summary = 'Helper for nested forms with dynamic fields.'
|
13
|
-
spec.homepage = "https://github.com/mortik/dynamic_fields_for_rails"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
-
spec.add_development_dependency "rake", '~> 0'
|
23
|
-
spec.add_development_dependency "mocha", '~> 0'
|
24
|
-
spec.add_development_dependency "sqlite3", '~> 0'
|
25
|
-
|
26
|
-
spec.add_dependency "rails", '>= 3.0.0', '< 5.0'
|
27
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# rubocop:disable ClassAndModuleChildren
|
2
|
-
class ActiveRecord::Base
|
3
|
-
mattr_accessor :shared_connection
|
4
|
-
@@shared_connection = nil
|
5
|
-
|
6
|
-
def self.connection
|
7
|
-
@@shared_connection || retrieve_connection
|
8
|
-
end
|
9
|
-
end
|
10
|
-
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
data/test/dummy/Rakefile
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
-
|
4
|
-
require File.expand_path('../config/application', __FILE__)
|
5
|
-
require 'rake'
|
6
|
-
|
7
|
-
Dummy::Application.load_tasks
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
form.html.erb
|
@@ -1,41 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require "rails/all"
|
4
|
-
|
5
|
-
Bundler.require
|
6
|
-
require "dynamic_fields_for_rails"
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
# Settings in config/environments/* take precedence over those specified here.
|
11
|
-
# Application configuration should go into files in config/initializers
|
12
|
-
# -- all .rb files in that directory are automatically loaded.
|
13
|
-
|
14
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
-
|
17
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
-
|
21
|
-
# Activate observers that should always be running.
|
22
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
-
|
24
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
27
|
-
|
28
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
-
# config.i18n.default_locale = :de
|
31
|
-
|
32
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
33
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
34
|
-
|
35
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
36
|
-
config.encoding = "utf-8"
|
37
|
-
|
38
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
39
|
-
config.filter_parameters += [:password]
|
40
|
-
end
|
41
|
-
end
|
data/test/dummy/config/boot.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
development:
|
4
|
-
adapter: sqlite3
|
5
|
-
database: db/development.sqlite3
|
6
|
-
pool: 5
|
7
|
-
timeout: 5000
|
8
|
-
|
9
|
-
# Warning: The database defined as "test" will be erased and
|
10
|
-
# re-generated from your development database when you run "rake".
|
11
|
-
# Do not set this db to the same as development or production.
|
12
|
-
test:
|
13
|
-
adapter: sqlite3
|
14
|
-
database: db/test.sqlite3
|
15
|
-
pool: 5
|
16
|
-
timeout: 5000
|
17
|
-
|
18
|
-
production:
|
19
|
-
adapter: sqlite3
|
20
|
-
database: db/production.sqlite3
|
21
|
-
pool: 5
|
22
|
-
timeout: 5000
|
@@ -1,24 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the webserver when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
config.eager_load = false
|
10
|
-
|
11
|
-
# Show full error reports and disable caching
|
12
|
-
config.consider_all_requests_local = true
|
13
|
-
config.action_view.debug_rjs = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
|
16
|
-
# Don't care if the mailer can't send
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
18
|
-
|
19
|
-
# Print deprecation notices to the Rails logger
|
20
|
-
config.active_support.deprecation = :log
|
21
|
-
|
22
|
-
# Only use best-standards-support built into browsers
|
23
|
-
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The production environment is meant for finished, "live" apps.
|
5
|
-
# Code is not reloaded between requests
|
6
|
-
config.cache_classes = true
|
7
|
-
config.eager_load = true
|
8
|
-
|
9
|
-
# Full error reports are disabled and caching is turned on
|
10
|
-
config.consider_all_requests_local = false
|
11
|
-
config.action_controller.perform_caching = true
|
12
|
-
|
13
|
-
# Specifies the header that your server uses for sending files
|
14
|
-
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
15
|
-
|
16
|
-
# For nginx:
|
17
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
18
|
-
|
19
|
-
# If you have no front-end server that supports something like X-Sendfile,
|
20
|
-
# just comment this out and Rails will serve the files
|
21
|
-
|
22
|
-
# See everything in the log (default is :info)
|
23
|
-
# config.log_level = :debug
|
24
|
-
|
25
|
-
# Use a different logger for distributed setups
|
26
|
-
# config.logger = SyslogLogger.new
|
27
|
-
|
28
|
-
# Use a different cache store in production
|
29
|
-
# config.cache_store = :mem_cache_store
|
30
|
-
|
31
|
-
# Disable Rails's static asset server
|
32
|
-
# In production, Apache or nginx will already do this
|
33
|
-
config.serve_static_assets = false
|
34
|
-
|
35
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
36
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
37
|
-
|
38
|
-
# Disable delivery errors, bad email addresses will be ignored
|
39
|
-
# config.action_mailer.raise_delivery_errors = false
|
40
|
-
|
41
|
-
# Enable threaded mode
|
42
|
-
# config.threadsafe!
|
43
|
-
|
44
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
45
|
-
# the I18n.default_locale when a translation can not be found)
|
46
|
-
config.i18n.fallbacks = true
|
47
|
-
|
48
|
-
# Send deprecation notices to registered listeners
|
49
|
-
config.active_support.deprecation = :notify
|
50
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
config.eager_load = false
|
10
|
-
|
11
|
-
# Show full error reports and disable caching
|
12
|
-
config.consider_all_requests_local = true
|
13
|
-
config.action_controller.perform_caching = false
|
14
|
-
|
15
|
-
# Raise exceptions instead of rendering exception templates
|
16
|
-
config.action_dispatch.show_exceptions = false
|
17
|
-
|
18
|
-
# Disable request forgery protection in test environment
|
19
|
-
config.action_controller.allow_forgery_protection = false
|
20
|
-
|
21
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
22
|
-
# The :test delivery method accumulates sent emails in the
|
23
|
-
# ActionMailer::Base.deliveries array.
|
24
|
-
config.action_mailer.delivery_method = :test
|
25
|
-
|
26
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
27
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
28
|
-
# like if you have constraints or database-specific column types
|
29
|
-
# config.active_record.schema_format = :sql
|
30
|
-
|
31
|
-
# Print deprecation notices to the stderr
|
32
|
-
config.active_support.deprecation = :stderr
|
33
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|