Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
create_default_lists was accidentally protected.
  • Loading branch information
seaneshbaugh committed May 12, 2014
1 parent 4c4a80e commit 309a4a6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/models/user.rb
Expand Up @@ -102,6 +102,18 @@ def default_list
self.card_lists.where(:default => true).first
end

def create_default_lists
if self.card_lists.length == 0
self.card_lists << CardList.new({ :name => 'Have', :have => true, :order => 0, :default => true })

self.card_lists << CardList.new({ :name => 'Want', :have => false, :order => 1, :default => false })

self.card_lists << CardList.new({ :name => 'Have (foil)', :have => true, :order => 2, :default => false })

self.card_lists << CardList.new({ :name => 'Want (foil)', :have => false, :order => 3, :default => false })
end
end

protected

def password_required?
Expand All @@ -115,16 +127,4 @@ def define_role
self.role = Ability::ROLES[:read_only]
end
end

def create_default_lists
if self.card_lists.length == 0
self.card_lists << CardList.new({ :name => 'Have', :have => true, :order => 0, :default => true })

self.card_lists << CardList.new({ :name => 'Want', :have => false, :order => 1, :default => false })

self.card_lists << CardList.new({ :name => 'Have (foil)', :have => true, :order => 2, :default => false })

self.card_lists << CardList.new({ :name => 'Want (foil)', :have => false, :order => 3, :default => false })
end
end
end

0 comments on commit 309a4a6

Please sign in to comment.