I am trying to use Ruby on Rails 4.0 HStore Extension for PostreSQL . I would like to make one of my HStore fields:
class Thing < ActiveRecord::Base
Being new to HStore, I created a scaffold for Thing ( rails g scaffold Thing field_name:hstore ). The execution of this fixture file ( test/fixtures/things.yml ) did not contain a default value for field_name :
one:
This results in a rake test error because there is no value for the required field.
My question is: how to set the value in the YAML file for fixtures for field_name so that my tests pass?
I still know:
This one does not work :
one:
This also does not work :
one: # ... field_name: {"small"=>"2", "medium"=>"5", "large"=>"4"} # ...
Thanks!
user636044
source share