Commit 6fc128f2

mo k <mo@mokhan.ca>
2012-06-09 01:33:42
remove deprecated devise settings and add 2 settings to spec_helper to increase test time by 2 seconds.
1 parent 651d324
Changed files (3)
app
models
config
initializers
spec
app/models/user.rb
@@ -21,10 +21,8 @@ class User < ActiveRecord::Base
 
   def add_favorite( creation )
     if self.already_likes(creation)
-      logger.info 'already likes creation'
       favorites.find { |favorite| favorite.user == self }
     else
-      logger.info 'add creation'
       creation.favorites.create({:user_id => self.id})
     end
   end
config/initializers/devise.rb
@@ -63,7 +63,7 @@ Devise.setup do |config|
   # You can use this to let your user access some features of your application
   # without confirming the account, but blocking it after a certain period
   # (ie 2 days).
-  # config.confirm_within = 2.days
+  # config.allow_unconfirmed_access_for = 2.days
 
   # Defines which key will be used when confirming an account
   # config.confirmation_keys = [ :email ]
@@ -72,9 +72,6 @@ Devise.setup do |config|
   # The time the user will be remembered without asking for credentials again.
   # config.remember_for = 2.weeks
 
-  # If true, a valid remember token can be re-used between multiple browsers.
-  # config.remember_across_browsers = true
-
   # If true, extends the user's remember period when remembered via cookie.
   # config.extend_remember_period = false
 
@@ -139,10 +136,6 @@ Devise.setup do |config|
   # Defines name of the authentication token params key
   # config.token_authentication_key = :auth_token
 
-  # If true, authentication through token does not store user in session and needs
-  # to be supplied on each request. Useful if you are using the token as API token.
-  # config.stateless_token = false
-
   # ==> Scopes configuration
   # Turn scoped views on. Before rendering "sessions/new", it will first check for
   # "users/sessions/new". It's turned off by default because it's slower if you
spec/spec_helper.rb
@@ -26,3 +26,6 @@ RSpec.configure do |config|
   # instead of true.
   config.use_transactional_fixtures = true
 end
+
+Devise.stretches = 1
+Rails.logger.level = 4