Skip to content

Commit

Permalink
Fix ActiveModel API changes from 3.x to 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
phildionne committed May 4, 2015
1 parent 59cc0c9 commit 74e6c3b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/geojsonlint/geojson_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
require 'geojsonlint/geojson_validator'

class Feature
include ActiveModel::Model
include ActiveModel::Validations

def initialize(params={})
params.each do |attr, value|
self.public_send("#{attr}=", value)
end if params

super()
end

attr_accessor :geojson

validates :geojson, geojson: true
Expand Down

0 comments on commit 74e6c3b

Please sign in to comment.