ActionController::Parameters
Constructors
Instance methods
empty?
Sourcepermit + require: every filtered key must be present and non-empty.
expect({"post" => [:title, :body]}) — same Hash-argument style
as permit.
keys
Sourceparameters
permit(*filters) : Parameters
permit(:title, {"author" => [:name]}) — nested/array filters are
passed as a Hash argument instead of Ruby keyword syntax
(documented deviation: Crystal can't take heterogeneous keyword
splats here).
permit!
Sourcepermitted?
Sourcerequire(:post) returns the nested parameters themselves (as in Rails); require([:a, :b]) returns a Parameters holding those keys.
size
Sourceto_h
SourceAppends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
to_unsafe_h
Source