I have to navigate through a list of content/html files in a directory,
displaying the content in a div. But I can''t seem to get the customer
partials to render within the div. Here''s what I have:
# ---- DIRECTORY ----
# Folder_One/Sub_Folder/_this_is_partial_one.rhtml
# Folder_Two/Sub_Folder/_this_is_partial_two.rhtml
Now, I have the folder names stored in the DB, and all that is left is
to pull out the partial and update the div via ajax as I navigate (using
next/prev) through the directory. But I can''t even get the page to
load
the first partial, without even touching the navigation, etc. Here''s
what I''m doing:
# initial load of the view
<div id="changing-content">
<%=render :partial =>
"#{@first_folder}/#{@second_folder}/#{@gsub_partial}"%>
</div>
That will return the following:
"Folder_One/Sub_Folder/this_is_partial_one"
However, I''m getting ''@_test_file_1.rhtml'' is not
allowed as an instance
variable name''
And I''ve tried keeping these external folders/files in the public
directory, as well as the lib directory. Any thoughts on why I can''t
render a custome partial?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---