Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Add the hstore type to the model and correct some issues with routes #2

Open
boriscy opened this issue Sep 14, 2012 · 0 comments
Open

Comments

@boriscy
Copy link

boriscy commented Sep 14, 2012

I have cloned your repo and in Product model you should add

class Product < ActiveRecord::Base
  belongs_to :user

  serialize :data, ActiveRecord::Coders::Hstore

  def as_json(options = {})
    {:name => name, :data => data}
  end
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant