Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor

Showing 2 changed files with 3 additions and 7 deletions. Show diff stats Hide diff stats

  1. +1 1  Rakefile
  2. +2 6 lib/seinfeld/user.rb
2  Rakefile
@@ -118,7 +118,7 @@ namespace :seinfeld do
118 118 task :activate => :init do
119 119 login = ENV['user'].to_s
120 120 if login.size.zero?
121   - Seinfeld::User.activate_group(50)
  121 + Seinfeld::User.activate_all
122 122 else
123 123 Seinfeld::User.activate_user(login)
124 124 end
8 lib/seinfeld/user.rb
@@ -31,12 +31,8 @@ def login=(s)
31 31 write_attribute :login, s.blank? ? nil : s.downcase
32 32 end
33 33
34   - def self.activate_group(limit = 50)
35   - disabled = connection.quote_column_name :disabled
36   - truthy = connection.quoted_true
37   - falsey = connection.quoted_false
38   - sql = "UPDATE #{quoted_table_name} SET #{disabled} = #{falsey} WHERE #{disabled} = #{truthy} LIMIT #{limit.to_i}"
39   - connection.execute(sql)
  34 + def self.activate_all
  35 + update_all({:disabled => false}, :disabled => true)
40 36 end
41 37
42 38 def self.activate_user(login)

No commit comments for this range

Something went wrong with that request. Please try again.