02 May '13, 7am

Big fan of strong_parameters. But recommended usage for #new action is a bit weak: params.fetch(:key, {}).permit(…)

class ClientsController < ApplicationController # This action uses query string parameters because it gets run # by an HTTP GET request, but this does not make any difference # to the way in which the parameters are accessed. The URL for # this action would look like this in order to list activated # clients: /clients?status=activated def index if params[:status] == "activated" @clients = Client.activated else @clients = Client.inactivated end end # This action uses POST parameters. They are most likely coming # from an HTML form which the user has submitted. The URL for # this RESTful request will be "/clients", and the data will be # sent as part of the request body. def create @client = Client.new(params[:client]) if @client.save redirect_to @client else # This line overrides the default rendering behavior, which # would have been to render the "create" view. render "ne...

Full article: http://edgeguides.rubyonrails.org/action_controller_overv...

Tweets

strong_parameters are good and you should feel ...

robots.thoughtbot.com 01 May '13, 6pm

May 1, 2013 calebjthompson strong_parameters ruby rails strong_parameters are good and you should feel good Besides moving...

‘Star Trek Into Darkness’: First Reviews Praise the Action and New Villain

‘Star Trek Into Darkness’: First Reviews Praise...

sg.movies.yahoo.com 03 May '13, 1am

Zachary Quinto and Chris Pine in 'Star Trek Into Darkness' (Photo: Paramount Pictures) The first reviews of "Star Trek Int...

Since Rails 4.0's release is imminent, here's t...

edgeguides.rubyonrails.org 02 May '13, 2am

The best way to be sure that your application still works after upgrading is to have good test coverage before you start t...

How to Solve the Sexism in SEO 'Problem': Stop Complaining & Take Action

How to Solve the Sexism in SEO 'Problem': Stop ...

searchenginewatch.com 30 Apr '13, 9am

At SES New York in March, I organized the first Girls' Night Out for some of the female SES speakers. Not only was a great...

@gonortheast Drives Exciting Action-Packed North East Festival. #FestNE

@gonortheast Drives Exciting Action-Packed Nort...

simplygo.com 02 May '13, 10am

Festival of the North East - sponsored by Go North East - has launched a jam-packed, exciting programme of events for June...

GM Becomes First Automaker To Sign Call For Action On Climate Change #car #green

GM Becomes First Automaker To Sign Call For Act...

greencarreports.com 02 May '13, 3pm

Together, Ceres and BICEP have drafted the Climate Declaration , a document that urges the U.S. government to take action ...

Pebble watch hack makes it a home automation controller

Pebble watch hack makes it a home automation co...

hackaday.com 03 May '13, 1pm

So far the two bits of hardware used in his experiments are shown in the image above. The watch itself serves as the contr...

EU #carbon prices rise as #Merkel urges #backlo...

pointcarbon.com 03 May '13, 11am

HAMBURG, May 3 (Reuters) - German Chancellor Angela Merkel said on Friday economic growth assumptions behind the European ...

Class Action Lawsuit Filed Against Ford Over C-...

evworld.com 28 Apr '13, 5am

PHOTO CAPTION: Ford claims C-Max Hybrid got combine fuel economy of 47 mpg. Class Action Lawsuit Filed Against Ford Over C...

The 5 Best Ways to Get Under a Dodger Fan's Skin This Weekend - #BeatLA

The 5 Best Ways to Get Under a Dodger Fan's Ski...

modernluxury.com 03 May '13, 5pm

My name is Jeremy Dorn and I'm a Bay Area-born and-bred Dodgers fan. Guilty as charged. But living in enemy territory isn'...

Every right action is also a mistake

chadfowler.com 23 Apr '13, 6am

Throughout my career, I’ve had the opportunity on multiple occasions to manage large teams. Every time this happens, I am ...

Just announced: @GM becomes first automaker to sign the #climatedeclaration, along with 6 more major brands:

Just announced: @GM becomes first automaker to ...

ceres.org 01 May '13, 4pm

Seven more U.S. businesses, including iconic U.S. automaker General Motors, have signed the Climate Declaration , a statem...

The Future of Marketing: 3 Big Changes That Are...

networksolutions.com 01 May '13, 7pm

The Future of Marketing: 3 Big Changes That Are Already Here May 1st, 2013 :: Monika Jansen Each January, experts from eve...