Now when I do a search for the string "Héctor Lavoe" it matches the string "Hector Lavoe". Awesome!
Edit: fixed missing "
%s/\(.\{250\}[^ ]* \)/\1 \\^M/gc
User.find(10)
SELECT * FROM users WHERE (users.`id` = 10)
User.find( :all, :conditions => ['id = ?', 10] )
SELECT * FROM users WHERE (id = 10)
User.find( :all, :conditions => { :id => 10 } )SELECT * FROM users WHERE (users.`id` = 10)
User.find( :all, :conditions => { :id => [10,12] } )SELECT * FROM users WHERE (users.`id` IN (10,12))
User.find(10)or this: User.find( :all, :conditions => ['id = ?', 10] ).
User.find( :all, :conditions => { :id => 10 } )
>> [ "Bacon Lettuce Tomato", nil ].collect {|s| s.upcase.reverse[0,6].reverse }
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.upcase
from (irb):15
from (irb):15:in `collect'
from (irb):15
>> [ "Bacon Lettuce Tomato", nil ].collect {|s| s.upcase.reverse[0,6].reverse rescue nil }
=> ["TOMATO", nil]
>> [ "Bacon Lettuce Tomato", nil ].collect {|s| s.upcase.reverse[0,6].reverse rescue "" }
=> ["TOMATO", ""]