Sha256: 9124cb2d996c84f1765e641bd7cf8b1886ea7f0925471d7cb80003474af7cc32

Contents?: true

Size: 365 Bytes

Versions: 4

Compression:

Stored size: 365 Bytes

Contents

module ValidParamsExtraction
  def extract_valid_params(model)
    string_value_hash = Hash[model.attributes.map{|k,v| [k,v.to_s]}]
    comparable_attributes = string_value_hash.reject{|k,v|
      %w(created_at updated_at id event_id).include?(k.to_s)
    }

    return comparable_attributes
  end
end

RSpec.configure do |c|
  c.include ValidParamsExtraction
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre4 spec/support/valid_params_extraction.rb
open_conference_ware-1.0.0.pre3 spec/support/valid_params_extraction.rb
open_conference_ware-1.0.0.pre2 spec/support/valid_params_extraction.rb
open_conference_ware-1.0.0.pre1 spec/support/valid_params_extraction.rb