diff options
author | Reverite <github@reverite.sh> | 2019-09-30 16:38:09 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-09-30 16:38:09 -0700 |
commit | 01001ba118d7adcd4966c893cf95db32fe76c273 (patch) | |
tree | fc8b580c8f0a3c1e14a8ca20e3bea5bd7acb4ff1 /app/models/form/migration.rb | |
parent | 1e75b3d874973dd71ea74b158ebeb501d9ac68a3 (diff) | |
parent | 65db9df011a3e13efa79f4e56343aa69bdad7716 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/models/form/migration.rb')
-rw-r--r-- | app/models/form/migration.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/app/models/form/migration.rb b/app/models/form/migration.rb deleted file mode 100644 index c2a8655e1..000000000 --- a/app/models/form/migration.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class Form::Migration - include ActiveModel::Validations - - attr_accessor :acct, :account - - def initialize(attrs = {}) - @account = attrs[:account] - @acct = attrs[:account].acct unless @account.nil? - @acct = attrs[:acct].gsub(/\A@/, '').strip unless attrs[:acct].nil? - end - - def valid? - return false unless super - set_account - errors.empty? - end - - private - - def set_account - self.account = (ResolveAccountService.new.call(acct) if account.nil? && acct.present?) - end -end |