Skip to content

Commit

Permalink
Small cleanups on steps.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
QuotableWater7 committed Apr 8, 2015
1 parent 40bef61 commit 36da965
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/wicked/controller/concerns/steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def previous_step(current_step = nil)
index = steps.index(current_step)
step = steps.at(index - 1) if index.present? && index != 0
step ||= steps.first
step
end


Expand All @@ -90,7 +89,6 @@ def next_step(current_step = nil)
index = steps.index(current_step)
step = steps.at(index + 1) if index.present?
step ||= Wicked::FINISH_STEP
step
end

private
Expand All @@ -104,8 +102,7 @@ def current_step_index
end

def current_and_given_step_exists?(step_name)
return false if current_step_index.nil? || steps.index(step_name).nil?
return true
current_step_index.present? && steps.index(step_name).present?
end
end

0 comments on commit 36da965

Please sign in to comment.