Displaying 1 result from an estimated 1 matches for "show_photo".
2006 Feb 03
0
component/ajax variable access problem
...it shows the correct image. But when clicking on
it, it gives an error because it doesn''t know what @images is anymore.
On the view for the home page:
<div id="easel"><%= render_component(:controller =>
''tiny_gallery/album'', :action => ''show_photo'', :params =>{:context=>
:home }) %></div>
Component Controller:
class TinyGallery::AlbumController < ActionController::Base
uses_component_template_root
def show_photo
case
when params[:context] == :home
@images = [''/images/1.jpg'...