What button/link are you hitting that you want to reload the page
with? What is the name of the function? What is the name of the
view? What is the name of the controller? What is the name of the
RJS file? Are you passing in info from the app to reload it?
What button/link are you hitting that you want to reload the page with?
This creates a list of all the images in the client_images table
associated with that client. It appears just below “content_top”.
<% if @images.length > 1 %>
<% @images.each_with_index do |image, index| %>
<%= link_to_remote index + 1,
{ :url => { :action => 'view_image', :id => image } },
{ :href => url_for(:action => 'view_image', :id => image ) }
%>
<% end %>
<% end %>
What is the name of the function? What is the name of the
view? What is the name of the controller? What is the name of the
RJS file?
Everything is under the Client controller.
This all takes place under the ‘show’ view and action, ‘view_image’ is
the action to cycle out images and is also the name of the RJS.
Are you passing in info from the app to reload it?
Yes. The value of the image to be changed is passed to the
session[:image] variable.
The idea is that by default the image shown is the oldest one associated
with that client. @image is stored in a session variable
(session[:image]) and called in the image_tag at the top. If a link in
the ul is clicked, the ID of the image is passed to the ‘view_image’
action.
The view_image action assigns this new image to the session[:image]
variable and the RJS reloads the div ‘content_top’.
where do slide_array and slide_link reside?..It is basically a
slideshow of images and I have to take off some of the pictures and
modify them. But I don’t know how to access slide_array.
I tried to read up on link_to’s and image_tag’s APIs, didn’t really
help.
Any help would be appreciated.
Thank you
On May 18 2007, 12:01 pm, Aaron W. <rails-mailing-l…@andreas-
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.