Show More
Commit Description:
merge
Commit Description:
merge
References:
File last commit:
Show/Diff file:
Action:
app/models/group_problem.rb | 7 lines | 282 B | text/x-ruby | RubyLexer |
class GroupProblem < ActiveRecord::Base
self.table_name = 'groups_problems'
belongs_to :problem
belongs_to :group
validates_uniqueness_of :problem_id, scope: :group_id, message: ->(object, data) { "'#{Problem.find(data[:value]).full_name}' is already in the group" }
end