On Apr 23, 8:07 pm, DrV <[email protected]> wrote: > I've been working on a new project and created a custom method for one > of the models. Nothing major. > > I brought up the console in --sandbox mode (also have tried in > standard console), and tried playing with it. To my surprise there > was a problem with the if/elseif conditional. The elseif portion > simply would not work. So I tried a couple commands as so to test the > actual if/elseif integrity like so: > > person = "Jim" > if person == "Sally" > puts "Hi Sally" > elseif person == "Jim" > puts "Hi Jim" > end >
I assume you've got elsif rather than elseif (which doesn't exist ) or else if, which isn't the same. > This returns nil. puts always returns nil. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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-talk?hl=en -~----------~----~----~----~------~----~------~--~---

