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