Skip to content

Commit

Permalink
Updated the initializeers and routes file to make app compatible with…
Browse files Browse the repository at this point in the history
… Rails 4. Updated Rails version to 4.1.6 and added corresponding dependencies to Gemfile.
  • Loading branch information
Shanil Puri committed Sep 20, 2014
1 parent 1a187ef commit b830e68
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
# Ignore all Gemgile.lock
Gemfile.lock


# Ignore the .idea folder generated by RubyMine
.idea/
# Add non-default ignores below
12 changes: 7 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
source 'https://rubygems.org'

gem 'rails', '3.2.13'
gem 'rails', '4.1.6'
gem 'execjs'
gem 'therubyracer'
gem 'bootstrap-sass', '2.0.0'
gem 'activeresource'
gem 'activerecord'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2', '0.3.11'
gem 'mysql2'
gem 'devise'

# 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', github: 'rails/sass-rails'
gem 'coffee-rails'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby

gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails', '1.0.19'
gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Application < Rails::Application
# 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 = false
# config.active_record.whitelist_attributes = false

# Enable the asset pipeline
config.assets.enabled = true
Expand Down
5 changes: 3 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.eager_load = false
config.cache_classes = false

# Log error messages when you accidentally call methods on nil.
Expand All @@ -23,11 +24,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
Expand Down
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

resources :user

match "posts/published", :to => "post#published"
match "posts/drafts", :to => "post#drafts"
get "posts/published", :to => "post#published"
get "posts/drafts", :to => "post#drafts"
resources :post do
get :show_post_body
get :publish_draft
Expand Down

0 comments on commit b830e68

Please sign in to comment.