Skip to content

Commit

Permalink
fix for bank account validations
Browse files Browse the repository at this point in the history
  • Loading branch information
chiramiso committed Feb 3, 2015
1 parent 8545dff commit fd86064
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app/models/user/validations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ module User::Validations
validates_associated :standard_address

with_options if: :wants_to_sell? do |seller|
seller.validates :direct_debit, acceptance: {accept: true}, on: :update
seller.validates :bank_account_owner, :iban, :bic, presence: true
seller.validates :standard_address, presence: true
end

Expand Down
2 changes: 2 additions & 0 deletions app/models/users/legal_entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class LegalEntity < User

with_options if: :wants_to_sell? do |seller|
# validates legal entity
seller.validates :direct_debit, acceptance: {accept: true}, on: :update
seller.validates :bank_account_owner, :iban, :bic, presence: true
seller.validates :terms, presence: true, on: :update
seller.validates :about, presence: true, on: :update
seller.validates :cancellation, presence: true, on: :update
Expand Down

0 comments on commit fd86064

Please sign in to comment.