Skip to content
This repository has been archived by the owner on Jan 3, 2021. It is now read-only.

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VandorpeDavid committed Aug 28, 2016
1 parent 468275a commit a97c6da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/models/card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def isic?
self.card_type == 'isic'
end

def citylife?
self.card_type == 'citylife'
end

# Renders the academic year in a more commonly used format
def full_academic_year
unless academic_year.blank?
Expand Down
2 changes: 1 addition & 1 deletion app/models/club.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Club < ActiveRecord::Base
scope :with_internal_name, -> name { where('LOWER(internal_name) LIKE LOWER(?)', name ) }

attr_accessible :description, :info_text, :confirmation_text,
:registration_method, :uses_fk, :uses_isic, :isic_mail_option
:registration_method, :uses_fk, :uses_isic, :uses_citylife, :isic_mail_option

has_attached_file :export
# Do not validate the export. We create it ourselves so we trust it
Expand Down
8 changes: 8 additions & 0 deletions app/models/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ def uses_isic?
end
end

def uses_citylife?
if self.current_card
self.current_card.citylife?
else
pick_card_type == 'citylife'
end
end

# Handy defaults
after_initialize :defaults
def defaults
Expand Down

0 comments on commit a97c6da

Please sign in to comment.