Favorites model

2018-11-13 Thread Jeremy Evans
Sequel[:user_favorites][:kind] is probably the easiest. There are other ways if that doesn't work. -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Favorites model

2018-11-13 Thread craig buchanan
I would like to allow a User to mark a Contact or Entity as a favorite. Towards this end, I have these tables: * users, contacts, entities * users_favorites: :id, :user_id, :favorite_id, :kind User model: many_to_many :contacts, :class => Contact, :join_table => :users_favorites,

Mysql2::Error: Duplicate entry for '%s' for key '%s' is not handled by UniqueConstraintViolation

2018-11-13 Thread Jeremy Evans
Sure, please submit as a PR. I won't be able to test and merge for a couple weeks, but it should make the next release. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails

Mysql2::Error: Duplicate entry for '%s' for key '%s' is not handled by UniqueConstraintViolation

2018-11-13 Thread Marcelo Pereira
Hello, I have this error being raised: ``` Mysql2::Error: Duplicate entry '...' for key 'index_users_on_userid_and_application_id': INSERT INTO `users` (`userid`, `application_id`, `created_at`, `updated_at`) VALUES (...) ``` and it doesn't get rescued with `rescue