It looks like it's a DB-level constraint that's throwing the error as
opposed to something at the model level .. still figuring out how to
correct this ..

SQLite3::ConstraintException: column name is not unique: INSERT INTO
"snippets" ("name", "updated_by_id", "created_at", "filter_id",
"updated_at", "created_by_id", "lock_version", "content", "site_id")
VALUES('google_analytics', NULL, '2011-02-14 05:59:51', '',
'2011-02-14 05:59:51', 1, 0, 'blam', 2)

On Feb 13, 9:46 pm, craayzie <> wrote:
> So this appears to be simple issue of the Snippets model validation
> not being updated. I know the proper way to do this is to create an
> ActiveRecord migration but just to see it work I hand-edited vendor/
> radiant/app/models/snippet.rb
> - validates_uniqueness_of :name, :scope
> + validates_uniqueness_of :name, :scope => :site_id
> I then ran 'rake db:migrate' but nothing changed? Did I miss a step?

Reply via email to