return a statified or random sample returns a nested array of sample records Usually you will want sample.flatten The nested structure is available for plotting (say different colors) to see locality and trends.

Instance Method Details

#is_active_record_method?(method_name) ⇒ Boolean

To detect collisions between attributes as methods and ActiveRecord methods.

Returns:

(Boolean)

136
137
138
139
140
141
142

# File 'app/models/generic_table.rb', line 136defis_active_record_method?(method_name)ifActiveRecord::Base.instance_methods_from_class(true).include?(method_name.to_s)thenreturntrueelsereturnfalseend#if
end

return a statified or random sample returns a nested array of sample records Usually you will want sample.flatten The nested structure is available for plotting (say different colors) to see locality and trends.