diff -uwrN questionnaire-after/Gemfile /home/asang/questionnaire-after/Gemfile
--- questionnaire-after/Gemfile 2012-04-19 10:45:53.000000000 +0530
+++ /home/asang/questionnaire-after/Gemfile 2015-04-05 19:13:56.751426282 +0530
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', '3.2.3'
+gem 'rails', '~> 4.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -11,8 +11,8 @@
# Gems used only for assets and not required
# in production environments by default.
group :assets do
- gem 'sass-rails', '~> 3.2.3'
- gem 'coffee-rails', '~> 3.2.1'
+ gem 'sass-rails'
+ gem 'coffee-rails'
and some other files:
diff -uwrN questionnaire-after/config/application.rb /home/asang/questionnaire-after/config/application.rb
--- questionnaire-after/config/application.rb 2012-04-19 10:45:53.000000000 +0530
+++ /home/asang/questionnaire-after/config/application.rb 2015-04-05 19:13:56.739426266 +0530
@@ -48,7 +48,7 @@
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
- config.active_record.whitelist_attributes = true
+ #config.active_record.whitelist_attributes = true
# Enable the asset pipeline
config.assets.enabled = true
diff -uwrN questionnaire-after/config/environments/development.rb /home/asang/questionnaire-after/config/environments/development.rb
--- questionnaire-after/config/environments/development.rb 2012-04-19 10:45:53.000000000 +0530
+++ /home/asang/questionnaire-after/config/environments/development.rb 2015-04-05 19:13:56.739426266 +0530
@@ -23,11 +23,11 @@
config.action_dispatch.best_standards_support = :builtin
# Raise exception on mass assignment protection for Active Record models
- config.active_record.mass_assignment_sanitizer = :strict
+ #config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
- config.active_record.auto_explain_threshold_in_seconds = 0.5
+ #config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false
If you are still interested, you can checkout my forked repo on github - https://github.com/asang/403-dynamic-forms
In order for this to work with Rails 4.0 or later, you have to use http://blog.trackets.com/2013/08/17/strong-parameters-by-example.html and make following changes to
app/controllers/survey_controller.rb
Few other changes are required in
GemFile
and some other files: