Skip to content

Commit

Permalink
Fix specs. Remove unnecesary relation.
Browse files Browse the repository at this point in the history
  • Loading branch information
taitus committed Dec 27, 2017
1 parent 77c7b85 commit eb0fb5f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Event < ActiveRecord::Base
validates_inclusion_of :lobby_activity, :in => [true, false]
validate :participants_uniqueness, :position_not_in_participants, :role_validate_scheduled, :validate_location
validates :canceled_reasons, presence: { message: I18n.t('backend.lobby_not_allowed_neither_empty_mail') }, allow_blank: false, if: Proc.new { |a| !a.canceled_at.blank? }
validates :declined_reasons, presence: { message: I18n.t('backend.lobby_not_allowed_neither_empty_mail') }, allow_blank: false, if: Proc.new { |a| !a.declined_at.blank? || (a.current_user && !a.current_user.lobby?) }
validates :declined_reasons, presence: { message: I18n.t('backend.lobby_not_allowed_neither_empty_mail') }, allow_blank: false, if: Proc.new { |a| !a.declined_at.blank? && a.current_user.present? && !a.current_user.lobby? }

before_create :set_status
before_update :set_published_at
Expand Down
1 change: 0 additions & 1 deletion app/models/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class Organization < ActiveRecord::Base
has_many :organization_registered_lobbies, dependent: :destroy
has_many :registered_lobbies, through: :organization_registered_lobbies, dependent: :destroy
has_many :attachments, dependent: :destroy
has_one :comunication_representant, dependent: :destroy
has_one :user, dependent: :destroy
has_one :legal_representant, dependent: :destroy
belongs_to :category
Expand Down

0 comments on commit eb0fb5f

Please sign in to comment.