02 May '13, 6am

Strong parameters as documentation

May 1, 2013 calebjthompson strong_parameters ruby rails documentation Strong parameters as documentation Besides moving attribute whitelisting to the controller rather than the model, Rails 4’s move to Strong Parameters over attr_accessible provides great documentation about the data with which records are being created. strong_parameters are good and you should feel good Here is an example of a controller many of us have written, using strong_parameters : class CommentsController < ApplicationController respond_to :html def create @comment = Comment.create(comment_params) respond_with @comment end private def comment_params params. require(:comment). permit(:body). merge(user: current_user, commentable: commentable) end def commentable # find and return a commentable record end end Notice how the comment_params method tells you at a glance what object’s parameters this...

Full article: http://robots.thoughtbot.com/post/49374573556/strong-para...

Tweets

Rental is definitely strong! - Page 4

forums.condosingapore.com 01 May '13, 7am

nowadays, the cluster landed like staring straight into your neighbours living room or bed room. have to find those where ...

Strong BANDS to play national fitness month of May - United States Army (press release): Strong BANDS to play

Strong BANDS to play national fitness month of ...

army.mil 03 May '13, 1pm

SAN ANTONIO (May 2, 2013) -- Get fit. Eat better. Feel better. Be better. Army Strong B.A.N.D.S. is back. The largest Army...

High unemployment rate in Philippines despite strong economic growth

High unemployment rate in Philippines despite s...

channelnewsasia.com 30 Apr '13, 4pm

MANILA: Despite strong economic growth, the unemployment rate in the Philippines remains the highest in Southeast Asia. Th...