From 4c1b437ed7dea3660065c03e5e056a8aac700e21 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 21 Apr 2015 16:15:45 -0400 Subject: [PATCH] Use nex hash syntax on tests --- actionpack/test/controller/api/conditional_get_test.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actionpack/test/controller/api/conditional_get_test.rb b/actionpack/test/controller/api/conditional_get_test.rb index e729ea9d33..3863e2a45d 100644 --- a/actionpack/test/controller/api/conditional_get_test.rb +++ b/actionpack/test/controller/api/conditional_get_test.rb @@ -3,22 +3,22 @@ require 'active_support/core_ext/integer/time' require 'active_support/core_ext/numeric/time' class ConditionalGetApiController < ActionController::API - before_action :handle_last_modified_and_etags, :only => :two + before_action :handle_last_modified_and_etags, only: :two def one - if stale?(:last_modified => Time.now.utc.beginning_of_day, :etag => [:foo, 123]) - render :text => "Hi!" + if stale?(last_modified: Time.now.utc.beginning_of_day, etag: [:foo, 123]) + render text: "Hi!" end end def two - render :text => "Hi!" + render text: "Hi!" end private def handle_last_modified_and_etags - fresh_when(:last_modified => Time.now.utc.beginning_of_day, :etag => [ :foo, 123 ]) + fresh_when(last_modified: Time.now.utc.beginning_of_day, etag: [ :foo, 123 ]) end end