Hi All,
I am new to Ruby, Basically am a java developer. I have webservice, i
want to create a view which access the webservice and display result.
For that i want to create a util class which access webservice and then
access that class in view. so any one can give me an idea how to do this
and where do i need to place all this files in ruby on rails.
Thanks in advance
Chinna.
Try the RAILS_ROOT/lib directory in your rails application. You should
have
access to it in the view as well as other sections.
On Fri, Nov 13, 2009 at 1:45 AM, Chinna Gogulapati <
[email protected]> wrote:
Chinna.
Posted via http://www.ruby-forum.com/.
–
Darian Shimy
Chinna Gogulapati wrote:
Hi All,
I am new to Ruby, Basically am a java developer. I have webservice, i
want to create a view which access the webservice and display result.
For that i want to create a util class which access webservice and then
access that class in view. so any one can give me an idea how to do this
Don’t – you’ll break MVC. Instead, call the Web service in the
controller, store the returned data in a variable, and read that
variable in the view.
Have you looked at ActiveResource?
and where do i need to place all this files in ruby on rails.
As others have said, the lib directory is generally a good place for
utility classes that are not clearly models or helpers.
Thanks in advance
Chinna.
Best,
Marnen Laibow-Koser
http://www.marnen.org
[email protected]