Skip to content

Commit

Permalink
put param method in correct file
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 authored and TheWalkingLeek committed Jul 28, 2023
1 parent cbcd837 commit 745558d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ class ApplicationController < ActionController::Base

delegate :model_identifier, to: :class

def nil_param?(value)
value == 'null' ? nil: value
end

def set_locale
locale = I18n.default_locale
if current_user
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/concerns/param_converters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ module ParamConverters
def true?(value)
%w[1 yes true].include?(value.to_s.downcase)
end

def nil_param?(value)
value == "null" ? nil : value
end
end

0 comments on commit 745558d

Please sign in to comment.