Displaying 2 results from an estimated 2 matches for "some_other_string".
2006 Feb 01
4
Custom view helpers
Hi all,
I would like to write some custom helpers like the ones available as
form helpers text_field, text_area and the like. My first try was this:
custom_helper(obj, meth)
''some_string'' + obj.send(meth) + ''some_other_string''
end
Object and method are being passed as symbols like this:
custom_helper(:person, :name)
and Ruby rightfully complains that the symbol person does not have a
method named name. Second try was this. @person is an instance
variable of the controller, right?
custom_helper(obj, meth...
2006 Mar 14
8
The RoR equivalent of out.write() in JSP?
All,
In JSP, I can output strings in the Web page by either
<%= foo %> //foo is a string or returns a string
or
<% out.write("test") %> //write directly to the output stream.
What is the method of "writing to the output stream" in RoR? Basically,
what is the equivalent of out.write()?
I have an if then statement that I want to put around a call to
h