Skip to content

Commit 89af143

Browse files
committed
Fix undefined method error when :day_of_week key is integer; fixes gregschmit#163.
1 parent 07c4b05 commit 89af143

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/recurring_select.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def self.filter_params(params)
5959
# this is soooooo ugly
6060
if params[:validations][:day_of_week]
6161
params[:validations][:day_of_week] ||= {}
62-
if params[:validations][:day_of_week].length > 0 and not params[:validations][:day_of_week].keys.first =~ /\d/
62+
if params[:validations][:day_of_week].length > 0 and not params[:validations][:day_of_week].keys.first.to_s =~ /\d/
6363
params[:validations][:day_of_week].symbolize_keys!
6464
else
6565
originals = params[:validations][:day_of_week].dup

0 commit comments

Comments
 (0)