Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Anyone moving to Rails 4 has seen the documented examples like this: params.require(:coffee).permit(:all, :the, :things). But if the codebase has multiple controllers (including a few over 1000 lines long), some api endpoints, nested attributes nesting inside attributes that are named things like additional_attributes_attributes, and robust test coverage that has likely caused forbidden attribute grief, then this talk about some of the little/not documented details of the parameters we call strong might be your cup of...coffee. Help us caption & translate this video! http://amara.org/v/HLd1/
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In her talk "I Like My Params Like I Like My Coffee", Tara Scherner De La Fuente shares valuable insights into using strong parameters in Ruby on Rails, particularly for complex applications. The presentation explores the challenges faced when transitioning from Rails 3 to Rails 4, especially with intricate models and lengthy controllers. The talk emphasizes the importance of parameter management to secure applications against unauthorized data manipulation. **Key Points Discussed:** - **Introduction to Strong Parameters**: Tara provides a brief overview of the strong parameters concept, which aims to prevent users from inserting unwanted data into an application. She explains how to implement this by using methods like `require` and `permit` in controllers. - **Implementation Challenges**: After significant modifications to models and controllers, Tara recounts her experiences applying strong parameters, highlighting difficulties encountered with complex nested attributes. - **Best Practices**: She shares practical advice, such as using `permit!` for initially allowing all attributes when dealing with complicated models. This approach can ease the process before refining the allowed parameters. - **Common Pitfalls**: Tara discusses common errors, including misuse of parameter management—strong parameters should not delete attributes and can lead to confusion about data presence. - **Testing**: Insights are also shared on testing controllers and API endpoints, particularly about handling errors that arise when expected parameters are not passed correctly in requests. Tara advises always including valid attributes in test hashes to avoid confusion. - **Collaboration and Learning**: Throughout the journey, collaboration with colleagues proved to be crucial; it not only led to solving substantial issues but also fostered continuous learning, particularly with the importance of the order of parameters. - **Final Thoughts**: Tara concludes with key takeaways that include starting with broad permission for attributes, the necessity of refining parameter lists, and the importance of collaboration and order in setting parameters. Her journey emphasizes how junior engineers can bring enthusiasm to rigorous and tedious tasks. This talk serves as a critical resource for developers encountering difficulties with strong parameters in Rails, providing both foundational knowledge and advanced tips for effective implementation.
Suggest modifications
Cancel