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
def show
if params[:course_id] && permitted_to?(:browse, :videos)
...
Ruby Need to DRY this if-else up
by fnjord.myopenid.com,
March 25, 2009 17:43,
3 refactorings, tagged with rails, ruby, dry, conditions, if else
I thought of creating a bef...
def create
@announcement = current_account.announcements.build(params[:announcement])
...
Ruby Re-Refactor Mailer Conditions
by fnjord.myopenid.com,
February 13, 2009 17:44,
2 refactorings, tagged with rails, ruby, conditions, controller, mailer
This is just a mess. It wou...
I want to avoid the abuse o...