Commit 873120cefa81d0b94f22db7db142680da9a15c4b

Authored by Daniela Feitosa
1 parent 687f3e11

Added new db/schema.rb

Also replaced "if !" by "unless"
app/models/user.rb
... ... @@ -25,7 +25,7 @@ class User < ActiveRecord::Base
25 25 if user.environment.nil?
26 26 user.environment = Environment.default
27 27 end
28   - user.send(:make_activation_code) if !user.environment.enabled?('skip_new_user_email_confirmation')
  28 + user.send(:make_activation_code) unless user.environment.enabled?('skip_new_user_email_confirmation')
29 29 end
30 30  
31 31 after_create do |user|
... ...
db/migrate/20120813163139_set_activation_code_to_nil_if_already_activated.rb
1 1 class SetActivationCodeToNilIfAlreadyActivated < ActiveRecord::Migration
2 2 def self.up
3   - update("UPDATE users SET activation_code = ? WHERE activated_at IS NOT NULL")
  3 + update("UPDATE users SET activation_code = null WHERE activated_at IS NOT NULL")
4 4 end
5 5  
6 6 def self.down
... ...
db/schema.rb
... ... @@ -9,7 +9,7 @@
9 9 #
10 10 # It's strongly recommended to check this file into your version control system.
11 11  
12   -ActiveRecord::Schema.define(:version => 20120411132751) do
  12 +ActiveRecord::Schema.define(:version => 20120813163139) do
13 13  
14 14 create_table "abuse_reports", :force => true do |t|
15 15 t.integer "reporter_id"
... ...