Sha256: cd7bacd7e76acf09e0e3c9458f4fe6fd73f4fceb577fac2518745732df360313

Contents?: true

Size: 411 Bytes

Versions: 15

Compression:

Stored size: 411 Bytes

Contents

class ActiveRecord::Base
    # Utility method to easily see if the model contains all columns
    # given. Most authentication modules use this to see if they are
    # enabled or not by checking for their required columns.
    def self.includes_all_columns?(*columns)
      columns = columns.flatten.compact
      columns.collect! {|c| c.to_s}

      columns.all? {|c| self.column_names.include? c}
    end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
adva-0.3.2 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.3.1 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.3.0 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.2.4 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.2.3 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.2.2 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.2.1 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.2.0 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.1.4 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.1.3 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.1.2 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.1.1 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.1.0 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva_user-0.0.1 vendor/gems/authentication/lib/authentication/active_record_extensions.rb
adva-0.0.1 adva_user/vendor/gems/authentication/lib/authentication/active_record_extensions.rb