Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
Move auction archive action into create_published_state
Browse files Browse the repository at this point in the history
  • Loading branch information
adelevie committed Jan 13, 2017
1 parent 705bc55 commit 8870f1f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions app/services/update_auction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,13 @@ def perform

def create_auction_states
create_published_state
create_archived_state
# add more state creation here, as needed
end

def create_published_state
if parser.publishing?
ChangeState.new(auction, 'published', 'published').perform
end
end

def create_archived_state
if parser.archiving?
elsif parser.archiving?
ChangeState.new(auction, 'published', 'archived').perform
end
end
Expand Down

0 comments on commit 8870f1f

Please sign in to comment.