Earlier quoted context omitted.
All I can say is, I looked under the hood at the application we're talking about and thought these might be useful suggestions. Particularly attr_accessible. I've found a lot of Rails apps over the last couple years that were diligent about having an attr_accessible in every model, but not diligent about what went in the attr_accessible. Following the Rails idiom, they were doing all their attribute assignment throug…
When I was starting out, every tutorial seemed to assume that I even knew what "mass assignment" implied. Creating a bunch of bad things at once? Changing a lot of existing things in a bad way at once like their creator_id so a bad guy could access them? I think "mass assignment" and "attr_accessible" in tutorials should always link to the API documentation[1] that explains the implications and the tools at your disp…
How I Learned Enough Ruby On Rails In 12 Weeks To Launch Freelancify
81–83 of 83 posts
Re: How I Learned Enough Ruby On Rails In 12 Weeks To Launch Freelancify
#82Re: How I Learned Enough Ruby On Rails In 12 Weeks To Launch Freelancify
#83Congrats on the launch. I think I speak for everyone on HN when I say, you're going about this the right way: learn enough to build applications for yourself, whether or not you're going to be a code committer over the long term. Can I give you some quick advice? Don't take this the wrong way: Rails makes it easy to learn enough to be dangerous in 12 weeks. Some quick hits on obvious things you should look over in yo…
Teaching good security practices was one goal of the Ruby on Rails Tutorial (a resource mentioned in the OP). It uses attr_accessible for every model and uses find-through-association (emphasizing the security implications of both), and it most assuredly does not use the /:controller/:action/:id pattern or backticks. It punts image upload over to Gravatar, and recommends Paperclip for those who need custom uploads. H…
http://api.rubyonrails.org/classes/ActiveModel/MassAssignmen...