Skip to content
Browse files

Update login workflow for Rails3

  • Loading branch information...
1 parent cf48758 commit 5830f32d8f42d24a481a0c011cc541d24edd4af3 @rwdaigle committed Mar 9, 2012
View
1 Gemfile
@@ -6,6 +6,7 @@ gem 'will_paginate'
gem 'permalink_fu'
gem 'pg'
gem 'make_resourceful'
+gem 'dynamic_form'
gem 'haml'
gem 'sass'
View
2 Gemfile.lock
@@ -40,6 +40,7 @@ GEM
execjs
coffee-script-source (1.2.0)
diff-lcs (1.1.3)
+ dynamic_form (1.1.4)
erubis (2.7.0)
execjs (1.3.0)
multi_json (~> 1.0)
@@ -149,6 +150,7 @@ PLATFORMS
DEPENDENCIES
coffee-rails
+ dynamic_form
foreman
haml
heroku
View
1 app/controllers/sessions_controller.rb
@@ -2,6 +2,7 @@
class SessionsController < ApplicationController
skip_before_filter :login_required
+ layout 'bare'
# render new.rhtml
def new
View
2 app/controllers/users_controller.rb
@@ -1,6 +1,6 @@
class UsersController < ApplicationController
- skip_before_filter :login_required
+ skip_before_filter :login_required, :only => [:new, :create]
layout 'bare'
# render new.rhtml
View
4 app/helpers/application_helper.rb
@@ -13,11 +13,11 @@ def messages
end
def messages?
- flash.size > 0
+ !flash.empty?
end
# Print out this percentage
def p(percent)
sprintf("%0.0f%", percent)
end
-end
+end
View
6 config/application.rb
@@ -4,9 +4,9 @@
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
- Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
- # Bundler.require(:default, :assets, Rails.env)
+ Bundler.require(:default, :assets, Rails.env)
end
module Ptls
@@ -40,7 +40,7 @@ class Application < Rails::Application
config.filter_parameters += [:password]
# Enable the asset pipeline
- config.assets.enabled = true
+ config.assets.enabled = false
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
View
4 config/environments/development.rb
@@ -27,4 +27,8 @@
# Expands the lines which load the assets
config.assets.debug = true
+
+ # Rails 3.2
+ config.active_record.mass_assignment_sanitizer = :strict
+ config.active_record.auto_explain_threshold_in_seconds = 0.25
end
View
0 lib/assets/.gitkeep
No changes.

0 comments on commit 5830f32

Please sign in to comment.
Something went wrong with that request. Please try again.