def assign(hash)
      hash.each do |k, v|
        send("#{k.to_s.underscore}=", v.respond_to?(:strip) ? v.strip : v)
      end
    end
def assign(hash)
      hash.each do |k, v|
        send("
      end
    end
def assign ( hash ) hash . each do | k , v | send ( "#{k.to_s.underscore}=" , v . respond_to? ( :strip ) ? v . strip : v ) end end
Allows easy initialization for a model by assigning attributes from a hash.
Allows easy initialization for a model by assigning attributes from a hash .