Skip to content

Commit

Permalink
minor refatoring
Browse files Browse the repository at this point in the history
  • Loading branch information
yannlugrin committed Mar 7, 2012
1 parent d5fbb47 commit aabc2f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/timer_controller.rb
Expand Up @@ -24,12 +24,12 @@ def update
if @timer.update_attributes(options, as: :admin)
render nothing: true, status: 200
else
render nothing: true, status: 500
render nothing: true, status: :not_acceptable
end
end

def event
if publish_timer_action(params[:id], params[:timer])
if publish_timer_event(params[:id], params[:timer])
render nothing: true, status: 200
else
render nothing: true, status: :not_acceptable
Expand All @@ -45,7 +45,7 @@ def event
# Send event to all registred timer
#
# @return [Boolean] return false if params is invalid
def publish_timer_action(url_key, timer = {})
def publish_timer_event(url_key, timer = {})
if !%(start stop reset).include?(timer[:event]) || (timer[:time] && !timer[:time].is_a?(Hash))
false
else
Expand Down

0 comments on commit aabc2f7

Please sign in to comment.