fix rubocop issue
This commit is contained in:
parent
e92114a257
commit
e3174fa277
4 changed files with 10 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class Event < ActiveRecord::Base
|
||||
include ActiveRecord::Transitions
|
||||
|
||||
scope :vote, -> (votable_fields) { votable_fields.each { |field| ratyrate_rateable field.title } }
|
||||
scope :vote, ->(votable_fields) { votable_fields.each { |field| ratyrate_rateable field.title } }
|
||||
|
||||
has_paper_trail on: [:create, :update], ignore: [:updated_at, :guid, :week], meta: { conference_id: :conference_id }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
class VotableField < ActiveRecord::Base
|
||||
belongs_to :conference
|
||||
validates :title, :votable_type, :stars, presence: true
|
||||
validates :title, uniqueness: {scope: :votable_type, message: 'already exsists for the selected votable type'}
|
||||
validates :title, uniqueness: { scope: :votable_type, message: 'already exsists for the selected votable type' }
|
||||
|
||||
VALID_VOTABLE_TYPES = %w(Event).freeze
|
||||
VALID_VOTABLE_TYPES = %w[Event].freeze
|
||||
# ratyrate does not allow criterias to have spaces in them
|
||||
validate :no_spaces_in_title
|
||||
validate :correct_votable_type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue