I am furiously trying to find what I am looking for in Pickaxe book and
not finding it.
I’m getting some values back from a posted form and I need to get the
‘id’ number off the backend. The ‘String’ will always come back to me
as…
Some_name\r\n123
where 123 is actually the id number which I need to execute the find.
The reason they are coming back this way is from a composite
‘text_auto_complete_for’ methodology which is allowing users to pick by
name and I want the associated id column for an easy find.
But I can’t get to square one with irb…
irb(main):021:0> myvar = “Some_name\r\n123”
=> “Some_name\r\n123”
irb(main):022:0> show_regexp(myvar, /\w+/)
NoMethodError: undefined method `show_regexp’ for main:Object
from (irb):22
from :0
Please someone…
a. tell me what type of command I would need to pick the numbers off the
end
b. tell me why irb doesn’t do something so obviously in the Pickaxe
book.
Thanks
Craig