In a Rails controller, what does the code params.permit(:name, :sku) do?

Question:In a Rails controller, what does the code params.permit(:name, :sku) do?

1.It filters out all parameters.

2.It filters out submitted form parameters that are not named :name or :sku to make forms more secure.

3.It raises an error if parameters that are not named :name or :sku are found.

4.It raises an error if the :name and :sku parameters are set to nil.


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!