if params[:status] && params[:carrier] conditions = ["actual_delivery IS NOT NULL AND actual_delivery > scheduled_delivery AND status_id = ? AND carrier_id = ?", status.id, carrier.id] elsif params[:status] ...
if !birthdate.blank? && !location.blank? && !joined.blank? && !death.blank?
"<p class='birthinfo'>#{name} was born on #{birthdate.strftime("%A, %B %e, %Y")} in #{location}. #{sex} passed away on #{death.strftime("%B %e, %Y")} at the age of #{calculate_age(birthdate, death)}. #{sex} was a member of #{link_to user.login, profile_path(user.permalink)}'s family for #{distance_of_time_in_words(joined,death)}.</p>"
elsif !birthdate.blank? && !location.blank? && !joined.blank? && death.blank?
...
Ruby Massive if/elsif statement ...
The following if/elsif stat...
<?php
function makeSafe($variable, $escape=true) {
$variable = htmlentities($variable, ENT_QUOTES);
...
PHP makeSafe Content Filter
by Shpigford,
October 02, 2007 11:15,
8 refactorings
This is the function I've b...
Need some help refactoring ...