lib/ocean/ocean_application_controller.rb
def filtered_params(klass)
    result = {}
    params.each do |k, v|
      result[k] = v if klass.accessible_attributes.include?(k)
    end
    result
  end
#
# Filters away all non-accessible attributes from params. Thus, we still are
# using pre-Rails 4.0 protected attributes. This will eventually be replaced
# by strong parameters. Takes a class and returns a new hash containing only
# the model attributes which may be modified.
#
Filters away all non-accessible attributes from params. Thus, we still are
using pre-Rails 4.0 protected attributes. This will eventually be replaced
by strong parameters. Takes a class and returns a new hash containing only
the model attributes which may be modified.
Filters away all non - accessible attributes from params . Thus we still are using pre - Rails 4 . 0 protected attributes . This will eventually be replaced by strong parameters . Takes a class and returns a new hash containing only the model attributes which may be modified .
def filtered_params(klass)
    result = {}
    params.each do |k, v|
      result[k] = v if klass.accessible_attributes.include?(k)
    end
    result
  end
def filtered_params ( klass ) result = { } params . each do | k , v | result [ k ] = v if klass . accessible_attributes . include? ( k ) end result end
Filters away all non-accessible attributes from params.
Filters away all non - accessible attributes from params .
klass