Skip to content

Commit

Permalink
Add filters as convenient default.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jul 18, 2010
1 parent aecc014 commit 5e64699
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/durran/mongoid.git
revision: 54e8d67
revision: a5abe21
specs:
mongoid (2.0.0.beta9)
activemodel (~> 3.0.0.beta)
Expand All @@ -14,16 +14,17 @@ PATH
specs:
actionmailer (3.0.0.beta4)
actionpack (= 3.0.0.beta4)
mail (~> 2.2.3)
mail (~> 2.2.5)
actionpack (3.0.0.beta4)
activemodel (= 3.0.0.beta4)
activesupport (= 3.0.0.beta4)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
rack (~> 1.2.1)
rack-mount (~> 0.6.9)
rack-test (~> 0.5.4)
tzinfo (~> 0.3.16)
tzinfo (~> 0.3.22)
activemodel (3.0.0.beta4)
activesupport (= 3.0.0.beta4)
builder (~> 2.1.2)
Expand All @@ -32,7 +33,7 @@ PATH
activemodel (= 3.0.0.beta4)
activesupport (= 3.0.0.beta4)
arel (~> 0.4.0)
tzinfo (~> 0.3.16)
tzinfo (~> 0.3.22)
activeresource (3.0.0.beta4)
activemodel (= 3.0.0.beta4)
activesupport (= 3.0.0.beta4)
Expand All @@ -43,7 +44,7 @@ PATH
activerecord (= 3.0.0.beta4)
activeresource (= 3.0.0.beta4)
activesupport (= 3.0.0.beta4)
bundler (>= 1.0.0.beta.2)
bundler (>= 1.0.0.beta.5)
railties (= 3.0.0.beta4)
railties (3.0.0.beta4)
actionpack (= 3.0.0.beta4)
Expand All @@ -58,8 +59,8 @@ GEM
arel (0.4.0)
activesupport (>= 3.0.0.beta)
bcrypt-ruby (2.1.2)
bson (1.0.3)
bson_ext (1.0.1)
bson (1.0.4)
bson_ext (1.0.4)
builder (2.1.2)
columnize (0.3.1)
erubis (2.6.6)
Expand All @@ -73,11 +74,13 @@ GEM
mime-types (1.16)
mocha (0.9.8)
rake
mongo (1.0.3)
bson (= 1.0.3)
mongo (1.0.5)
bson (>= 1.0.4)
nokogiri (1.4.2)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.9)
rack (>= 1.0.0)
rack-test (0.5.4)
rack (>= 1.0)
rake (0.8.7)
Expand All @@ -87,7 +90,7 @@ GEM
ruby-debug-base (0.10.3)
linecache (>= 0.3)
sqlite3-ruby (1.3.1)
thor (0.13.7)
thor (0.13.8)
treetop (1.4.8)
polyglot (>= 0.3.1)
tzinfo (0.3.22)
Expand Down
5 changes: 5 additions & 0 deletions lib/devise/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ class Engine < ::Rails::Engine
end
end

initializer "devise.add_filters" do |app|
app.config.filter_parameters += [:password, :password_confirmation]
app.config.filter_parameters.uniq
end

unless Rails.env.production?
config.after_initialize do
actions = [:confirmation_instructions, :reset_password_instructions, :unlock_instructions]
Expand Down

0 comments on commit 5e64699

Please sign in to comment.