I understand the rails params hash is available in my controller methods, but I’m trying to understand how that happens. Is it a parameter passed to the method? If so, how can we access it since controller methods don’t have any declared arguments?
I understand the rails params hash is available in my controller methods, but I’m
Share
Its not a parameter, its actually just a ‘getter’ function, that is declared in https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/http/parameters.rb
So calls to params[:something] is really a method call which returns a hash, from which you access the http parameters.