Hello,

I have a problem with showing slides in a row. I would like to have a
slideshow which would show all pictures. I am learning RUby so this
example is from  book 'Ruby on Rails". I am using Rails 2.3.5. Below
the code that I use. The error that I am getting since Monday is:
ActionController::UnknownAction (No action responded to show_slide.
Actions: create, destroy, edit, index, new, show, and update)
I have included
  <%= javascript_include_tag :defaults %>
in app/views/layouts/application.html.erb

Could you help me? I have no idea why it doesn't work.

-------------------------------------------app/views/slideshows/
show.html.erb --------------- begin
<p><i><%= @slideshow.name %></i></p>
<% if @slide %>
 <div id='slides'>
   <%=  render :partial => "show_slide" %>
 </div>

 <%= periodically_call_remote :update    => 'slides',
                              :url       => { :action
=> :show_slide },
                              :frequency => 1 %>
<% end %>
<%= link_to 'Edit', edit_slideshow_path(@slideshow) %> |
<%= link_to 'Back', slideshows_path %>
-------------------------------------------app/views/slideshows/
show.html.erb --------------- end

-------------------------------------------app/views/slideshows/
_show_slide.html.erb --------------- begin
<%= image_tag "photos/#...@slide.photo.filename}" %>
<p><%= @slide.photo.filename %></p>
-------------------------------------------app/views/slideshows/
_show_slide.html.erb --------------- end

-------------------------------------------app/controllers/
slideshows_controller.rb --------------- begin
.
.
def show_slide
   @slideshow = session[:slideshow]
   session[:slide_index] += 1
   @slide = @slideshow.slides[session[:slide_index]]
   if @slide == nil
      session[:slide_index] = 0
      @slide = @slideshow.slides[0]
   end
   render :partial => "show_slide"
 end
-------------------------------------------app/controllers/
slideshows_controller.rb --------------- end



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

Reply via email to