# This is a sanitized example of what I am doing at work and was
perplexed

def Person.find_by_name(*params)
    puts "hello world!"
    params.first.chop! if params.first.last == "."
    super
end

# It strips the trailing . and puts hello world!
>> Person.find_by_name("Chris.")
"hello world!"
=> #<Person id: 1, :name: "Chris">

# I hit up arrow and enter

=> nil

# Why is the method not actually being called the second time?
# I can handle never working and always working, but always working
once I can't handle.

Thanks,
Chris Lundquist

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to