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



183
184
185
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 183

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

#done?Boolean

Returns:

  • (Boolean)


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

def done?
  
end

#in_progress?Boolean

Instance Methods

Returns:

  • (Boolean)


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

def in_progress?
  draft?
end

#individual?Boolean

Returns:

  • (Boolean)


187
188
189
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 187

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

#organization?Boolean

Returns:

  • (Boolean)


191
192
193
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 191

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

#ownerObject



175
176
177
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 175

def owner
  organization || user
end

#owner_symbolObject



179
180
181
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 179

def owner_symbol
  organization? ? :organization : :user
end

#reset!Object



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

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

#select!Object



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

def select!
  reset!
end

#to_sObject



171
172
173
# File 'app/models/concerns/effective_memberships_fee_payment.rb', line 171

def to_s
  'Fee Payment'
end