class ActiveUtils::PostData

Public Instance Methods

[]=(key, value) click to toggle source
Calls superclass method
# File lib/active_utils/post_data.rb, line 8
def []=(key, value)
  return if value.blank? && !required?(key)
  super
end
to_post_data() click to toggle source
# File lib/active_utils/post_data.rb, line 13
def to_post_data
  collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join("&")
end
Also aliased as: to_s
to_s()
Alias for: to_post_data

Private Instance Methods

required?(key) click to toggle source
# File lib/active_utils/post_data.rb, line 20
def required?(key)
  required_fields.include?(key)
end