Autocorrect Rails/EnumSyntax
This commit is contained in:
parent
5e439aa07b
commit
5b49af7559
4 changed files with 4 additions and 4 deletions
|
|
@ -96,7 +96,7 @@ class Conference < ApplicationRecord
|
||||||
after_create :create_free_ticket
|
after_create :create_free_ticket
|
||||||
after_update :delete_event_schedules
|
after_update :delete_event_schedules
|
||||||
|
|
||||||
enum ticket_layout: [:portrait, :landscape]
|
enum :ticket_layout, [:portrait, :landscape]
|
||||||
|
|
||||||
##
|
##
|
||||||
# Checks if the user is registered to the conference
|
# Checks if the user is registered to the conference
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ class Payment < ApplicationRecord
|
||||||
validates :user_id, presence: true
|
validates :user_id, presence: true
|
||||||
validates :conference_id, presence: true
|
validates :conference_id, presence: true
|
||||||
|
|
||||||
enum status: {
|
enum :status, {
|
||||||
unpaid: 0,
|
unpaid: 0,
|
||||||
success: 1,
|
success: 1,
|
||||||
failure: 2
|
failure: 2
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ class Survey < ActiveRecord::Base
|
||||||
has_many :survey_questions, dependent: :destroy
|
has_many :survey_questions, dependent: :destroy
|
||||||
has_many :survey_submissions, dependent: :destroy
|
has_many :survey_submissions, dependent: :destroy
|
||||||
|
|
||||||
enum target: [:after_conference, :during_registration, :after_event]
|
enum :target, [:after_conference, :during_registration, :after_event]
|
||||||
validates :title, presence: true
|
validates :title, presence: true
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ class SurveyQuestion < ActiveRecord::Base
|
||||||
has_many :survey_replies, dependent: :destroy
|
has_many :survey_replies, dependent: :destroy
|
||||||
|
|
||||||
# Order of this list should not be changed without proper action!
|
# Order of this list should not be changed without proper action!
|
||||||
enum kind: [:boolean, :choice, :string, :text, :datetime, :numeric]
|
enum :kind, [:boolean, :choice, :string, :text, :datetime, :numeric]
|
||||||
|
|
||||||
ICONS = { boolean: 'circle-dot', choice: 'square-check', string: 'pen-to-square', text: 'align-left', datetime: 'clock', numeric: 'hashtag' }.freeze
|
ICONS = { boolean: 'circle-dot', choice: 'square-check', string: 'pen-to-square', text: 'align-left', datetime: 'clock', numeric: 'hashtag' }.freeze
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue