Module: EffectiveMembershipsFeePayment

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/effective_memberships_fee_payment.rb

Overview

EffectiveMembershipsFeePayment

Mark your model with effective_memberships_fee_payment to get all the includes

Defined Under Namespace

Modules: Base, ClassMethods

Instance Method Summary collapse

Instance Method Details

#build_organization(params = {}) ⇒ Object



197
198
199
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 197

def build_organization(params = {})
  self.organization = EffectiveMemberships.Organization.new(params)
end

#done?Boolean

Returns:

  • (Boolean)


214
215
216
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 214

def done?
  
end

#in_progress?Boolean

Instance Methods

Returns:

  • (Boolean)


210
211
212
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 210

def in_progress?
  draft?
end

#individual?Boolean

Returns:

  • (Boolean)


201
202
203
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 201

def individual?
  !owner.kind_of?(EffectiveMemberships.Organization)
end

#organization?Boolean

Returns:

  • (Boolean)


205
206
207
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 205

def organization?
  owner.kind_of?(EffectiveMemberships.Organization)
end

#ownerObject



189
190
191
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 189

def owner
  organization || user
end

#owner_symbolObject



193
194
195
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 193

def owner_symbol
  organization? ? :organization : :user
end

#reset!Object



222
223
224
225
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 222

def reset!
  assign_attributes(wizard_steps: wizard_steps.slice(:start))
  save!
end

#select!Object



218
219
220
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 218

def select!
  reset!
end

#to_sObject



185
186
187
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 185

def to_s
  'Fee Payment'
end