rubyonrailsin

A Ruby and Rails talk

Friday, April 2, 2010


[Rails] Using Builders

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

I am using RoR 2.3, and have installed the builder gem

I have a line in a view as follows:

str_xml = render "fusioncharts/array_example/ss_array_data.builder",
{:arr_data => @arr_data}

Which does not set str_xml to anything.

I can confirm that in my controller I have @arr_data set up and
populated properly. (And in my controller, I have require 'builder'
at the top)

In my views folder, I have a folder set up under it as "fusioncharts/
array_example/" and the file ss_array_data.builder. (However, this may
be why str_xml is not being set -- when I go to the URL which would
invoke this view, I get "Missing template _ss_array_data.builder in
view path..." It will only render the page if I put the underscore
before the filename ss_array_data.builder, making it a partial).

What am I not understanding about builders that I cannot convert my
array @arr_data to str_xml ?

Thanks so much, RVince

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive