search for: albumcontrol

Displaying 2 results from an estimated 2 matches for "albumcontrol".

2006 Feb 19
2
Sortable list (scriptalicious) and updating database
...ve made a sortable list which is sortable by dragging & dropping the list elements. It works, but the order of the elements will not be updated in the database. Hopefully someone could help me, or tell me what I''m doing wrong. Thnx! Rgds, Eric Controller: album_controller.rb class AlbumController < ApplicationController def show_sort_album @photos = Photo.find(:all) end def sort @photos.each do |photo| photo.position = params[''photo-list''].index(photo.id.to_s) + 1 photo.save end render :nothing => true end end Model...
2006 Feb 03
0
component/ajax variable access problem
...nymore. 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'', ''/images/2.jpg''] else @images = [''/images/test.gif''] end end...