Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update login workflow for Rails3

  • Loading branch information...
commit 5830f32d8f42d24a481a0c011cc541d24edd4af3 1 parent cf48758
Ryan Daigle authored
1  Gemfile
@@ -6,6 +6,7 @@ gem 'will_paginate'
6 6 gem 'permalink_fu'
7 7 gem 'pg'
8 8 gem 'make_resourceful'
  9 +gem 'dynamic_form'
9 10
10 11 gem 'haml'
11 12 gem 'sass'
2  Gemfile.lock
@@ -40,6 +40,7 @@ GEM
40 40 execjs
41 41 coffee-script-source (1.2.0)
42 42 diff-lcs (1.1.3)
  43 + dynamic_form (1.1.4)
43 44 erubis (2.7.0)
44 45 execjs (1.3.0)
45 46 multi_json (~> 1.0)
@@ -149,6 +150,7 @@ PLATFORMS
149 150
150 151 DEPENDENCIES
151 152 coffee-rails
  153 + dynamic_form
152 154 foreman
153 155 haml
154 156 heroku
1  app/controllers/sessions_controller.rb
@@ -2,6 +2,7 @@
2 2 class SessionsController < ApplicationController
3 3
4 4 skip_before_filter :login_required
  5 + layout 'bare'
5 6
6 7 # render new.rhtml
7 8 def new
2  app/controllers/users_controller.rb
... ... @@ -1,6 +1,6 @@
1 1 class UsersController < ApplicationController
2 2
3   - skip_before_filter :login_required
  3 + skip_before_filter :login_required, :only => [:new, :create]
4 4 layout 'bare'
5 5
6 6 # render new.rhtml
4 app/helpers/application_helper.rb
@@ -13,11 +13,11 @@ def messages
13 13 end
14 14
15 15 def messages?
16   - flash.size > 0
  16 + !flash.empty?
17 17 end
18 18
19 19 # Print out this percentage
20 20 def p(percent)
21 21 sprintf("%0.0f%", percent)
22 22 end
23   -end
  23 +end
6 config/application.rb
@@ -4,9 +4,9 @@
4 4
5 5 if defined?(Bundler)
6 6 # 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)))
8 8 # If you want your assets lazily compiled in production, use this line
9   - # Bundler.require(:default, :assets, Rails.env)
  9 + Bundler.require(:default, :assets, Rails.env)
10 10 end
11 11
12 12 module Ptls
@@ -40,7 +40,7 @@ class Application < Rails::Application
40 40 config.filter_parameters += [:password]
41 41
42 42 # Enable the asset pipeline
43   - config.assets.enabled = true
  43 + config.assets.enabled = false
44 44
45 45 # Version of your assets, change this if you want to expire all your assets
46 46 config.assets.version = '1.0'
4 config/environments/development.rb
@@ -27,4 +27,8 @@
27 27
28 28 # Expands the lines which load the assets
29 29 config.assets.debug = true
  30 +
  31 + # Rails 3.2
  32 + config.active_record.mass_assignment_sanitizer = :strict
  33 + config.active_record.auto_explain_threshold_in_seconds = 0.25
30 34 end
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.