def create
  allow_publish = logged_in? && @trend.allow_more_publishers?(params[:connection_id])
  if allow_publish && !@trend.include_publisher?(params[:connection_id])
...

Ruby what if I don't like too ma...

by edgarjs, October 21, 2010 15:50, 4 refactorings, tagged with rails, conditions, associations, controller, create, build, ifs

I want to avoid the abuse o...

380f2ee82510287050b118947e8526dd Talk
last_vehicle = Vehicle.find(:first, :order => 'id desc')

unless last_vehicle.blank?
...

Ruby Ruby on Rails reverse 'build'

by sperchard.myopenid.com, May 09, 2010 12:50, 2 refactorings, tagged with rails, ruby, build

In this scenario, a new Veh...

55502f40dc8b7c769880b10874abc9d0 Talk