Module: StrongLikeBull
- Defined in:
- lib/strong_like_bull.rb,
lib/strong_like_bull/version.rb
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Method Summary collapse
- #log_suggested_strong_parameters_format(key) ⇒ Object
- #suggested_strong_parameters_format(key) ⇒ Object
Instance Method Details
#log_suggested_strong_parameters_format(key) ⇒ Object
4 5 6 |
# File 'lib/strong_like_bull.rb', line 4 def log_suggested_strong_parameters_format(key) Rails.logger.info "STRONG PARAMETERS: #{self.class}##{action_name} - suggested format: params.require(:#{key}).permit #{suggested_strong_parameters_format key}" end |
#suggested_strong_parameters_format(key) ⇒ Object
8 9 10 11 12 |
# File 'lib/strong_like_bull.rb', line 8 def suggested_strong_parameters_format(key) hash = params.respond_to?(:to_unsafe_h) ? params.to_unsafe_h : params hash = hash[key] recursive_suggested_strong_parameters_format(hash) if hash end |