:id].include?(key.to_sym)}.each do |key, value|
next unless
active_scaffold_config.model.column_names.include?(key)
if value.is_a?(Array) <=== WHEN I TRY TO CREATE A URL WITH
AN ARRAY AS A PARAMETER VALUE IT ALWAYS COMES OUT AS A STRING???
conditions = merge_conditions(conditions,
["#{active_scaffold_config.model.table_name}.#{key.to_s} in (?)",
value])
else
conditions = merge_conditions(conditions,
["#{active_scaffold_config.model.table_name}.#{key.to_s} = ?", value])
end
end
thanks for the pointer & use of
“ActionController::AbstractRequest.parse_query_parameters” to test.
Do you know a Rails or Ruby method that can be used to convert an Array
or
Hash to the form required for a URL? (e.g. in my case I’ll be a view
wanting to create a URL to a Rails controller/action but with URL
parameters
including some that are Arrays).
thanks for the pointer & use of
“ActionController::AbstractRequest.parse_query_parameters” to test.
Do you know a Rails or Ruby method that can be used to convert an Array or
Hash to the form required for a URL? (e.g. in my case I’ll be a view
wanting to create a URL to a Rails controller/action but with URL parameters
including some that are Arrays).
to_query
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.