Skip to content

Commit 9fb02b5

Browse files
committed
Update testapp to rails 4
1 parent b53b739 commit 9fb02b5

File tree

7 files changed

+22
-29
lines changed

7 files changed

+22
-29
lines changed

testapp/Gemfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ gem 'rails'
44

55
gem 'sqlite3'
66

7-
group :assets do
8-
gem 'sass-rails', '~> 3.2.3'
9-
gem 'coffee-rails', '~> 3.2.1'
7+
gem 'sass-rails'
8+
gem 'coffee-rails'
109

11-
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
12-
# gem 'therubyracer', :platform => :ruby
10+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
11+
# gem 'therubyracer', :platform => :ruby
1312

14-
gem 'uglifier', '>= 1.0.3'
15-
gem 'anjlab-bootstrap-rails', '>= 2.1', :require => 'bootstrap-rails'
16-
gem 'bootstrap-wysihtml5-rails', :path => '../'
17-
gem 'jquery-rails'
18-
end
13+
gem 'uglifier'
14+
gem 'anjlab-bootstrap-rails', '>= 2.1', :require => 'bootstrap-rails'
15+
gem 'bootstrap-wysihtml5-rails', :path => '../'
16+
gem 'jquery-rails'

testapp/app/views/home/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1>Home#index</h1>
22
<p>Find me in app/views/home/index.html.erb</p>
33

4-
<textarea id="some-textarea" placeholder="Enter text ..."></textarea>
4+
<textarea id="some-textarea" style="width: 810px; height: 200px;" placeholder="Enter text ..."></textarea>
55

66
<script type="text/javascript">
77
$('#some-textarea').wysihtml5({
@@ -11,6 +11,6 @@
1111
"html": true, //Button which allows you to edit the generated HTML. Default false
1212
"link": true, //Button to insert a link. Default true
1313
"image": true, //Button to insert an image. Default true,
14-
"color": true //Button to change color of font
14+
"color": true //Button to change color of font
1515
});
1616
</script>

testapp/config/application.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
if defined?(Bundler)
66
# If you precompile assets before deploying to production, use this line
7-
Bundler.require(*Rails.groups(:assets => %w(development test)))
7+
# Bundler.require(*Rails.groups(:assets => %w(development test)))
88
# If you want your assets lazily compiled in production, use this line
9-
# Bundler.require(:default, :assets, Rails.env)
9+
Bundler.require(:default, Rails.env)
1010
end
1111

1212
module Testapp
@@ -48,7 +48,7 @@ class Application < Rails::Application
4848
# This will create an empty whitelist of attributes available for mass-assignment for all models
4949
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
5050
# parameters by using an attr_accessible or attr_protected declaration.
51-
config.active_record.whitelist_attributes = true
51+
# config.active_record.whitelist_attributes = true
5252

5353
# Enable the asset pipeline
5454
config.assets.enabled = true

testapp/config/environments/development.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
config.cache_classes = false
88

99
# Log error messages when you accidentally call methods on nil.
10-
config.whiny_nils = true
10+
# config.whiny_nils = true
1111

1212
# Show full error reports and disable caching
1313
config.consider_all_requests_local = true
1414
config.action_controller.perform_caching = false
1515

1616
# Don't care if the mailer can't send
1717
config.action_mailer.raise_delivery_errors = false
18-
18+
19+
config.eager_load = false
20+
1921
# config.action_controller.asset_host = 'testing'
2022

2123
# Print deprecation notices to the Rails logger
@@ -25,11 +27,7 @@
2527
config.action_dispatch.best_standards_support = :builtin
2628

2729
# Raise exception on mass assignment protection for Active Record models
28-
config.active_record.mass_assignment_sanitizer = :strict
29-
30-
# Log the query plan for queries taking more than this (works
31-
# with SQLite, MySQL, and PostgreSQL)
32-
config.active_record.auto_explain_threshold_in_seconds = 0.5
30+
# config.active_record.mass_assignment_sanitizer = :strict
3331

3432
# Do not compress assets
3533
config.assets.compress = false

testapp/config/environments/production.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
config.assets.compile = false
1919

2020
config.serve_static_assets = true
21-
21+
2222
# Generate digests for assets URLs
2323
config.assets.digest = true
2424

@@ -62,8 +62,4 @@
6262

6363
# Send deprecation notices to registered listeners
6464
config.active_support.deprecation = :notify
65-
66-
# Log the query plan for queries taking more than this (works
67-
# with SQLite, MySQL, and PostgreSQL)
68-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
6965
end

testapp/config/environments/test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
config.static_cache_control = "public, max-age=3600"
1313

1414
# Log error messages when you accidentally call methods on nil
15-
config.whiny_nils = true
15+
# config.whiny_nils = true
1616

1717
# Show full error reports and disable caching
1818
config.consider_all_requests_local = true
@@ -30,7 +30,7 @@
3030
config.action_mailer.delivery_method = :test
3131

3232
# Raise exception on mass assignment protection for Active Record models
33-
config.active_record.mass_assignment_sanitizer = :strict
33+
# config.active_record.mass_assignment_sanitizer = :strict
3434

3535
# Print deprecation notices to the stderr
3636
config.active_support.deprecation = :stderr

testapp/config/initializers/secret_token.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
# Make sure the secret is at least 30 characters and all random,
66
# no regular words or you'll be exposed to dictionary attacks.
77
Testapp::Application.config.secret_token = '412cfb8d8bc8bdf1ebd1d91b077635cd9eaae339ee4f2fd2bd8882172fda7ac99a34e80974328a567ba6764c5dc2febbda4075ef9cae80baa29ba7632ab51ee9'
8+
Testapp::Application.config.secret_key_base = 'new secret key base'

0 commit comments

Comments
 (0)