<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/controllers/admin/albums_controller.rb</filename>
    </added>
    <added>
      <filename>app/controllers/admin/photos_controller.rb</filename>
    </added>
    <added>
      <filename>app/controllers/admin/users_controller.rb</filename>
    </added>
    <added>
      <filename>app/controllers/manage/albums/photos_controller.rb</filename>
    </added>
    <added>
      <filename>app/controllers/manage/albums_controller.rb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/_album.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/_form.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/edit.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/index.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/new.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/photos/_form.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/photos/_photo.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/photos/edit.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/photos/index.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/photos/show.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/photos/thumb.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/albums/show.html.erb</filename>
    </added>
    <added>
      <filename>app/views/manage/users/change_password.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/_user.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/albums/index.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/albums/photos/index.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/albums/photos/show.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/albums/show.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/index.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,203 +1,23 @@
-== Welcome to Rails
-
-Rails is a web-application and persistence framework that includes everything
-needed to create database-backed web-applications according to the
-Model-View-Control pattern of separation. This pattern splits the view (also
-called the presentation) into &quot;dumb&quot; templates that are primarily responsible
-for inserting pre-built data in between HTML tags. The model contains the
-&quot;smart&quot; domain objects (such as Account, Product, Person, Post) that holds all
-the business logic and knows how to persist themselves to a database. The
-controller handles the incoming requests (such as Save New Account, Update
-Product, Show Post) by manipulating the model and directing data to the view.
-
-In Rails, the model is handled by what's called an object-relational mapping
-layer entitled Active Record. This layer allows you to present the data from
-database rows as objects and embellish these data objects with business logic
-methods. You can read more about Active Record in
-link:files/vendor/rails/activerecord/README.html.
-
-The controller and view are handled by the Action Pack, which handles both
-layers by its two parts: Action View and Action Controller. These two layers
-are bundled in a single package due to their heavy interdependence. This is
-unlike the relationship between the Active Record and Action Pack that is much
-more separate. Each of these packages can be used independently outside of
-Rails.  You can read more about Action Pack in
-link:files/vendor/rails/actionpack/README.html.
-
-
-== Getting Started
-
-1. At the command prompt, start a new Rails application using the &lt;tt&gt;rails&lt;/tt&gt; command
-   and your application name. Ex: rails myapp
-   (If you've downloaded Rails in a complete tgz or zip, this step is already done)
-2. Change directory into myapp and start the web server: &lt;tt&gt;script/server&lt;/tt&gt; (run with --help for options)
-3. Go to http://localhost:3000/ and get &quot;Welcome aboard: You&#8217;re riding the Rails!&quot;
-4. Follow the guidelines to start developing your application
-
-
-== Web Servers
-
-By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise
-Rails will use WEBrick, the webserver that ships with Ruby. When you run script/server,
-Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures
-that you can always get up and running quickly.
-
-Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
-suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
-getting up and running with mongrel is as easy as: &lt;tt&gt;gem install mongrel&lt;/tt&gt;.
-More info at: http://mongrel.rubyforge.org
-
-If Mongrel is not installed, Rails will look for lighttpd. It's considerably faster than
-Mongrel and WEBrick and also suited for production use, but requires additional
-installation and currently only works well on OS X/Unix (Windows users are encouraged
-to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from
-http://www.lighttpd.net.
-
-And finally, if neither Mongrel or lighttpd are installed, Rails will use the built-in Ruby
-web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not
-for production.
-
-But of course its also possible to run Rails on any platform that supports FCGI.
-Apache, LiteSpeed, IIS are just a few. For more information on FCGI,
-please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
-
-
-== Debugging Rails
-
-Sometimes your application goes wrong.  Fortunately there are a lot of tools that
-will help you debug it and get it back on the rails.
-
-First area to check is the application log files.  Have &quot;tail -f&quot; commands running
-on the server.log and development.log. Rails will automatically display debugging
-and runtime information to these files. Debugging info will also be shown in the
-browser on requests from 127.0.0.1.
-
-You can also log your own messages directly into the log file from your code using
-the Ruby logger class from inside your controllers. Example:
-
-  class WeblogController &lt; ActionController::Base
-    def destroy
-      @weblog = Weblog.find(params[:id])
-      @weblog.destroy
-      logger.info(&quot;#{Time.now} Destroyed Weblog ID ##{@weblog.id}!&quot;)
-    end
-  end
-
-The result will be a message in your log file along the lines of:
-
-  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
-
-More information on how to use the logger is at http://www.ruby-doc.org/core/
-
-Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
-
-* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
-* Learn to Program: http://pine.fm/LearnToProgram/  (a beginners guide)
-
-These two online (and free) books will bring you up to speed on the Ruby language
-and also on programming in general.
-
-
-== Debugger
-
-Debugger support is available through the debugger command when you start your Mongrel or
-Webrick server with --debugger. This means that you can break out of execution at any point
-in the code, investigate and change the model, AND then resume execution! Example:
-
-  class WeblogController &lt; ActionController::Base
-    def index
-      @posts = Post.find(:all)
-      debugger
-    end
-  end
-
-So the controller will accept the action, run the first line, then present you
-with a IRB prompt in the server window. Here you can do things like:
-
-  &gt;&gt; @posts.inspect
-  =&gt; &quot;[#&lt;Post:0x14a6be8 @attributes={\&quot;title\&quot;=&gt;nil, \&quot;body\&quot;=&gt;nil, \&quot;id\&quot;=&gt;\&quot;1\&quot;}&gt;,
-       #&lt;Post:0x14a6620 @attributes={\&quot;title\&quot;=&gt;\&quot;Rails you know!\&quot;, \&quot;body\&quot;=&gt;\&quot;Only ten..\&quot;, \&quot;id\&quot;=&gt;\&quot;2\&quot;}&gt;]&quot;
-  &gt;&gt; @posts.first.title = &quot;hello from a debugger&quot;
-  =&gt; &quot;hello from a debugger&quot;
-
-...and even better is that you can examine how your runtime objects actually work:
-
-  &gt;&gt; f = @posts.first
-  =&gt; #&lt;Post:0x13630c4 @attributes={&quot;title&quot;=&gt;nil, &quot;body&quot;=&gt;nil, &quot;id&quot;=&gt;&quot;1&quot;}&gt;
-  &gt;&gt; f.
-  Display all 152 possibilities? (y or n)
-
-Finally, when you're ready to resume execution, you enter &quot;cont&quot;
-
-
-== Console
-
-You can interact with the domain model by starting the console through &lt;tt&gt;script/console&lt;/tt&gt;.
-Here you'll have all parts of the application configured, just like it is when the
-application is running. You can inspect domain models, change values, and save to the
-database. Starting the script without arguments will launch it in the development environment.
-Passing an argument will specify a different environment, like &lt;tt&gt;script/console production&lt;/tt&gt;.
-
-To reload your controllers and models after launching the console run &lt;tt&gt;reload!&lt;/tt&gt;
-
-
-== Description of Contents
-
-app
-  Holds all the code that's specific to this particular application.
-
-app/controllers
-  Holds controllers that should be named like weblogs_controller.rb for
-  automated URL mapping. All controllers should descend from ApplicationController
-  which itself descends from ActionController::Base.
-
-app/models
-  Holds models that should be named like post.rb.
-  Most models will descend from ActiveRecord::Base.
-
-app/views
-  Holds the template files for the view that should be named like
-  weblogs/index.erb for the WeblogsController#index action. All views use eRuby
-  syntax.
-
-app/views/layouts
-  Holds the template files for layouts to be used with views. This models the common
-  header/footer method of wrapping views. In your views, define a layout using the
-  &lt;tt&gt;layout :default&lt;/tt&gt; and create a file named default.erb. Inside default.erb,
-  call &lt;% yield %&gt; to render the view using this layout.
-
-app/helpers
-  Holds view helpers that should be named like weblogs_helper.rb. These are generated
-  for you automatically when using script/generate for controllers. Helpers can be used to
-  wrap functionality for your views into methods.
-
-config
-  Configuration files for the Rails environment, the routing map, the database, and other dependencies.
-
-db
-  Contains the database schema in schema.rb.  db/migrate contains all
-  the sequence of Migrations for your schema.
-
-doc
-  This directory is where your application documentation will be stored when generated
-  using &lt;tt&gt;rake doc:app&lt;/tt&gt;
-
-lib
-  Application specific libraries. Basically, any kind of custom code that doesn't
-  belong under controllers, models, or helpers. This directory is in the load path.
-
-public
-  The directory available for the web server. Contains subdirectories for images, stylesheets,
-  and javascripts. Also contains the dispatchers and the default HTML files. This should be
-  set as the DOCUMENT_ROOT of your web server.
-
-script
-  Helper scripts for automation and generation.
-
-test
-  Unit and functional tests along with fixtures. When using the script/generate scripts, template
-  test files will be generated for you and placed in this directory.
-
-vendor
-  External libraries that the application depends on. Also includes the plugins subdirectory.
-  This directory is in the load path.
+Albumdy
+-------
+
+Yet another open source photo gallery application.
+
+There are many existing photo gallery apps around, but none I could find demonstrating the following key technologies:
+- Built with Ruby on Rails: http://www.rubyonrails.org/
+- CSS layout with Blueprint CSS: http://code.google.com/p/blueprintcss/
+- Client side scripting with the popular and unobtrusive jQuery: http://jquery.com/
+- Lightboxing effects using Leandro Vieira Pinho's jQuery lightBox: http://leandrovieira.com/projects/jquery/lightbox/
+- Textboxing effects using Cody Lindley's ThickBox: http://jquery.com/demo/thickbox/
+- Thin controllers with James Golick's resource_controller: http://jamesgolick.com/resource_controller
+- File uploads and thumbnail generation with Rick Olson's attachment_fu: http://github.com/technoweenie/attachment_fu
+- User Registration with Rick Olson's restful_authentication: http://github.com/technoweenie/restful-authentication
+- Plugin management for Git with Cristi Balan's Braid: http://github.com/evilchelu/braid
+- Project hosting with GitHub: http://github.com/
+- Organized nested routes as described in Regulators!!! Mount up: http://giantrobots.thoughtbot.com/2008/7/10/regulators-mount-up
+
+There are several other technologies I am considering migrating to or at least checking out within the context of this application:
+- Probably swapping attachment_fu for Thoughtbot's paperclip: http://www.thoughtbot.com/projects/paperclip
+- Possibly using Hampton Catlin's HAML: http://haml.hamptoncatlin.com/
+
+Grab the source from http://github.com/rapind/albumdy
\ No newline at end of file</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,17 @@
 class AlbumsController &lt; ResourceController::Base
 
+  belongs_to :user
+  
   actions :index, :show
   
+  index.flash 'Albums'
+  show.flash 'Album'
+  
   private #--------------
 
-  # Defining the collection explicitly for paging and to only return visibles
+  # Defining the collection explicitly for paging and limit to visible albums
   def collection
-    @collection ||= end_of_association_chain.paginate :conditions =&gt; 'visible = true', :page =&gt; params[:page], :per_page =&gt; 10, :order =&gt; 'created_at DESC'
+    @collection ||= end_of_association_chain.paginate :conditions =&gt; 'visible = 1', :page =&gt; params[:page], :per_page =&gt; 10, :order =&gt; 'created_at DESC'
   end
   
 end</diff>
      <filename>app/controllers/albums_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,11 +2,14 @@ class PhotosController &lt; ResourceController::Base
   
   actions :index, :show
   
+  index.flash 'Photos'
+  show.flash 'Photo'
+  
   private #--------------
 
-  # Defining the collection explicitly for paging and to only return visibles
+  # Defining the collection explicitly for paging and limit to visible photos
   def collection
-    @collection ||= end_of_association_chain.paginate :conditions =&gt; 'visible = true', :page =&gt; params[:page], :per_page =&gt; 10, :order =&gt; 'created_at DESC'
+    @collection ||= end_of_association_chain.paginate :conditions =&gt; 'visible = 1', :page =&gt; params[:page], :per_page =&gt; 10, :order =&gt; 'created_at DESC'
   end
   
 end
\ No newline at end of file</diff>
      <filename>app/controllers/photos_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,6 @@
 class Users::AlbumsController &lt; ResourceController::Base
+  
   belongs_to :user
   actions :index, :show
+  
 end</diff>
      <filename>app/controllers/users/albums_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class UsersController &lt; ResourceController::Base
   
-  actions :index, :show, :new, :create, :activate, :forgot_password, :reset_password
+  actions :index, :new, :create, :activate, :forget_password, :reset_password
   
   # registration
   def new
@@ -86,12 +86,12 @@ class UsersController &lt; ResourceController::Base
   def find_user
     @user = User.find(params[:id])
   end
-    
+  
   private #--------------
 
-  # Defining the collection explicitly for paging and to only return visibles
+  # Defining the collection explicitly for paging and limit to visible users
   def collection
-    @collection ||= end_of_association_chain.paginate :conditions =&gt; 'visible = true', :page =&gt; params[:page], :per_page =&gt; 10, :order =&gt; 'created_at DESC'
+    @collection ||= end_of_association_chain.paginate :conditions =&gt; 'visible = 1', :page =&gt; params[:page], :per_page =&gt; 10, :order =&gt; 'created_at DESC'
   end
   
 end</diff>
      <filename>app/controllers/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,5 +4,6 @@ class Album &lt; ActiveRecord::Base
   acts_as_list :scope =&gt; :user
   
   has_many :photos, :dependent =&gt; :destroy, :order =&gt; 'position'
+  has_many :visible_photos, :class_name =&gt; 'Photo', :conditions =&gt; 'visible = 1', :order =&gt; 'position'
   
 end</diff>
      <filename>app/models/album.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@ require 'digest/sha1'
 class User &lt; ActiveRecord::Base
   
   has_many :albums, :dependent =&gt; :destroy, :order =&gt; 'position'
+  has_many :visible_albums, :class_name =&gt; 'Album', :conditions =&gt; 'visible = 1', :order =&gt; 'position'
   
   # Virtual attribute for the unencrypted password
   attr_accessor :password</diff>
      <filename>app/models/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,14 @@
 &lt;li id=&quot;album_&lt;%= album.id %&gt;&quot;&gt;
   &lt;div class=&quot;span-5 first&quot;&gt;
-    &lt;%= link_to image_tag(album.photos.blank? ? 'empty.gif' : album.photos.first.public_filename(:album_cover), :size =&gt; '180x180', :class =&gt; 'album_cover', :alt =&gt; h(album.title), :title =&gt; h(album.title)), album %&gt;
+    &lt;%= link_to image_tag(album.photos.blank? ? 'empty.gif' : album.photos.first.public_filename(:album_cover), :size =&gt; '180x180', :class =&gt; 'album_cover', :alt =&gt; h(album.title), :title =&gt; h(album.title)), album_path(album) %&gt;
   &lt;/div&gt;
-  &lt;div class=&quot;span-6 last&quot;&gt;
+  &lt;div class=&quot;span-5 last&quot;&gt;
     &lt;p&gt;
-      &lt;%= link_to h(album.title), album %&gt;&lt;br /&gt;
+      &lt;%= link_to h(album.title), album_path(album) %&gt;&lt;br /&gt;
       &lt;small&gt;&lt;%= h album.created_at.strftime(&quot;%b %d, %Y&quot;) %&gt;&lt;/small&gt;
     &lt;/p&gt;
     &lt;p&gt;
-      &lt;%= h truncate(album.description, 240) %&gt;
+      &lt;%= h truncate(album.description, 200) %&gt;
     &lt;/p&gt;
   &lt;/div&gt;
 &lt;/li&gt;
\ No newline at end of file</diff>
      <filename>app/views/albums/_album.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,5 @@
 &lt;h1&gt;Albums&lt;/h1&gt;
 &lt;hr&gt;
-&lt;h2&gt;
-  &lt;%= link_to 'Create New Album', &quot;#{new_album_path}?width=315&amp;height=340&quot;, :title =&gt; 'Create New Album', :class =&gt; 'thickbox' %&gt;
-&lt;/h2&gt;
-
-&lt;fieldset&gt;
-  &lt;legend&gt;Albums&lt;/legend&gt;
-  &lt;ul id=&quot;albums&quot;&gt;
-    &lt;%= render :partial =&gt; &quot;album&quot;, :collection =&gt; @albums %&gt;
-  &lt;/ul&gt;
-&lt;/fieldset&gt;
\ No newline at end of file
+&lt;ul id=&quot;albums&quot;&gt;
+  &lt;%= render :partial =&gt; &quot;album&quot;, :collection =&gt; @albums %&gt;
+&lt;/ul&gt;
\ No newline at end of file</diff>
      <filename>app/views/albums/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,152 +1,19 @@
 &lt;script type=&quot;text/javascript&quot;&gt;
 
-// file upload object
-var swfu;
-
 $(function() {
 	
-	// binds / rebinds lightbox to photo clicks
-	function bindLightBox() {
-	  $('#photos a[@rel*=show]').lightBox();
-	}
-	
-	// bind the lightbox as son as we're loaded.
-	bindLightBox();
-	
-	// file upload settings
-  var settings = {
-		flash_url : &quot;/assets/swfupload_f9.swf&quot;,
-		upload_url: &quot;&lt;%= album_photos_path(@album) %&gt;&quot;,
-		file_size_limit : &quot;50 MB&quot;,
-		file_types : &quot;*.*&quot;,
-		file_types_description : &quot;All Images&quot;,
-		file_upload_limit : 50,
-		file_queue_limit : 0,
-		custom_settings : {
-			progressTarget : &quot;fsUploadProgress&quot;,
-			cancelButtonId : &quot;btnCancel&quot;
-		},
-		debug: false,
-
-		// The event handler functions are defined in handlers.js
-		file_queued_handler : fileQueued,
-		file_queue_error_handler : fileQueueError,
-		file_dialog_complete_handler : fileDialogComplete,
-		upload_start_handler : uploadStart,
-		upload_progress_handler : uploadProgress,
-		upload_error_handler : uploadError,
-		upload_success_handler : uploadSuccess,
-		upload_complete_handler : uploadComplete,
-		queue_complete_handler : queueComplete	// Queue plugin event
-	};
-
-  // init the file upload object
-	swfu = new SWFUpload(settings);
-	
-	
-	// append each new photo as they are uploaded to the list of photos via ajax
-	function uploadComplete(file) {
-	  $.get(&quot;&lt;%= thumb_album_photos_path(@album) %&gt;?filename=&quot; + file.name, function(data){
-      $(&quot;#photos&quot;).append(data);
-      
-      // re-bind lightbox to the photos elements
-      bindLightBox();
-    });
-	}
+	// binds lightbox to photo clicks
+  $('#photos a[@rel*=show]').lightBox();
 	
-	// Capture clicks within the photos list.
-	// This allows us to trap events from dynamically added ajax content within it.
-	$('#photos').click(function(e) {
-	  
-    if( $(e.target).is('a[@rel*=remove]') ) {
-      // remove link clicked, launch ajax remove
-      
-      // get the parent div so we can remove it on successful deletion
-  	  var thumb = $(e.target).parents(&quot;li&quot;);
-
-      // send the ajax delete request. This requires passing a _method=delete 
-      // param for the browser REST compatibility that rails supports.
-  	  $.post(e.target.href, {_method:&quot;delete&quot;, authenticity_token:&quot;&lt;%= form_authenticity_token %&gt;&quot;}, function(data) {
-  	    // remove the thumbnail from the display on success
-        thumb.remove();
-        
-        // re-bind lightbox to the photos elements so we have a correct count
-        bindLightBox();
-  	  });
-    
-    } else if( $(e.target).is('a[@rel*=edit]') ) {
-      // edit link clicked, launch thickbox
-      tb_show(e.target.title, e.target.href);
-       
-    }
-    
-    // cancel the click
-    return false;
-    
-  });
-  
-	
-	// allows for photo sorting within an album by dragging them around.
-	// updates the order on the fly using ajax
-	// this is by far the trickiest JS in the app
-	$(&quot;#photos&quot;).sortable({ 
-      placeholder: &quot;ui-selected&quot;,
-      opacity: 0.7,
-      update: function(e, ui) {
-        // determine the end position for the element that was moved
-        
-        // end order as an array
-        var end_order = $(this).sortable('serialize').replace(/photo\[\]\=/g, '').split('&amp;');
-        console.log('End order: ' + end_order);
-        
-        // id of element that was moved (element is in the ui.helper object)
-        var moved_photo_id = ui.helper.attr('id').replace('photo_', ''); // parse photo_ from the id
-        console.log('Moved photo id: ' + moved_photo_id);
-        
-        // determine the end position of the moved element
-        var end_position = 0;
-        // loop through all order elements
-        for (var y=0; y&lt;end_order.length; y++) {
-          // if the ids match, then we have the new index
-          if (end_order[y] === moved_photo_id) {
-            end_position = y;
-            break; // found it, bail
-          }
-        }
-        // increment it to match our backend which starts the list at 1 instead of 0
-        end_position++;
-        console.log('End position: ' + end_position);
-        
-        // ajax post to save the position change
-        // we're passing the parent album, the moved photo, and the new position of the photo
-        $.post('/albums/&lt;%= @album.id %&gt;/photos/' + moved_photo_id + '/update_position', {_method:&quot;put&quot;, authenticity_token:&quot;&lt;%= form_authenticity_token %&gt;&quot;, position:end_position}, function(data) {
-     	    
-          // re-bind lightbox so the photos elements are in the right order for next / prev buttons
-          bindLightBox();
-     	  });
-
-      },
-      revert: true
-  });
-  
 });
 &lt;/script&gt;
 &lt;h1&gt;
   &lt;%= h @album.title %&gt;
 &lt;/h1&gt;
-&lt;p&gt;
-  &lt;%= link_to 'Edit', &quot;#{edit_album_path(@album)}?width=315&amp;height=340&quot;, :title =&gt; h(@album.title), :class =&gt; 'thickbox' %&gt; | &lt;%= link_to 'Remove', @album, :confirm =&gt; &quot;Are you sure want to remove this album and all of it's photos?&quot;, :method =&gt; :delete %&gt; | &lt;%= link_to &quot;Back&quot;, albums_path %&gt;
-&lt;/p&gt;
-&lt;form id=&quot;form1&quot; action=&quot;#&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
-  &lt;div&gt;
-    &lt;input type=&quot;button&quot; value=&quot;Upload Photos&quot; onclick=&quot;swfu.selectFiles()&quot; style=&quot;font-size:8pt; border-width:1px; margin-bottom:10px; padding:2px 3px;&quot; /&gt;
-    &lt;input id=&quot;btnCancel&quot; type=&quot;button&quot; value=&quot;Cancel All Uploads&quot; onclick=&quot;swfu.cancelQueue();&quot; disabled=&quot;disabled&quot; style=&quot;font-size:8pt; border-width:1px; margin-bottom:10px; padding:2px 3px;&quot; /&gt;
-  &lt;/div&gt;
-&lt;/form&gt;
+&lt;hr&gt;
 &lt;fieldset&gt;
-  &lt;legend&gt;Photos - Drag photos to change their display order&lt;/legend&gt;
+  &lt;legend&gt;Photos&lt;/legend&gt;
   &lt;ul id=&quot;photos&quot;&gt;
-    &lt;%= render :partial =&gt; &quot;photos/photo&quot;, :collection =&gt; @album.photos %&gt;
+    &lt;%= render :partial =&gt; &quot;/photos/photo&quot;, :collection =&gt; @album.visible_photos %&gt;
   &lt;/ul&gt;
-&lt;/fieldset&gt;
-&lt;div id=&quot;divStatus&quot; style=&quot;display:none&quot;&gt;&lt;/div&gt;
\ No newline at end of file
+&lt;/fieldset&gt;
\ No newline at end of file</diff>
      <filename>app/views/albums/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 &lt;% if user_logged_in? -%&gt;
-  &lt;%= link_to 'Manage Your Albums', manage_user_albums_path(current_user) %&gt;
+  &lt;%= link_to 'Manage Your Albums', manage_albums_path %&gt;
   |
   &lt;%=link_to 'Recent Users', users_path %&gt;
   |
@@ -11,5 +11,5 @@
   |
   &lt;%= link_to 'Login', &quot;#{login_path}?height=250&amp;width=320&quot;, :title =&gt; 'Let me in', :class =&gt; 'thickbox' %&gt;
   |
-  &lt;%= link_to &quot;Get the Source&quot;, 'http://github.com' %&gt;
+  &lt;%= link_to &quot;Get the Source&quot;, 'http://github.com/rapind/albumdy' %&gt;
 &lt;% end -%&gt;
\ No newline at end of file</diff>
      <filename>app/views/layouts/_default.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@
     &lt;li&gt;Built with &lt;%= link_to 'Ruby on Rails', 'http://www.rubyonrails.org/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
     &lt;li&gt;CSS layout with &lt;%= link_to 'Blueprint CSS', 'http://code.google.com/p/blueprintcss/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
     &lt;li&gt;Client side scripting with the popular and unobtrusive &lt;%= link_to 'jQuery', 'http://jquery.com/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
-    &lt;li&gt;Lightboxing effects using &lt;%= link_to &quot;Leandro Vieira Pinho's jQuery lightBox&quot;, 'http://jquery.com/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
+    &lt;li&gt;Lightboxing effects using &lt;%= link_to &quot;Leandro Vieira Pinho's jQuery lightBox&quot;, 'http://leandrovieira.com/projects/jquery/lightbox/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
     &lt;li&gt;Textboxing effects using &lt;%= link_to &quot;Cody Lindley's ThickBox&quot;, 'http://jquery.com/demo/thickbox/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
     &lt;li&gt;Thin controllers with &lt;%= link_to &quot;James Golick's resource_controller&quot;, 'http://jamesgolick.com/resource_controller', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
     &lt;li&gt;File uploads and thumbnail generation with &lt;%= link_to &quot;Rick Olson's attachment_fu&quot;, 'http://github.com/technoweenie/attachment_fu/wikis', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;&lt;/li&gt;
@@ -23,10 +23,9 @@
   There are several other technologies I am considering migrating to or at least checking out within the context of this application:
   &lt;ul&gt;
     &lt;li&gt;Probably swapping attachment_fu for &lt;%= link_to &quot;Thoughtbot's paperclip&quot;, 'http://www.thoughtbot.com/projects/paperclip', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt; to reduce the complexity attachment_fu adds. Depending on whether paperclip adds &lt;%= link_to 'Amazon S3', 'http://aws.amazon.com/s3', :target =&gt; '_new', :rel =&gt; 'nofolow' %&gt; support.&lt;/li&gt;
-    &lt;li&gt;Possibly swapping resource_controller for &lt;%= link_to &quot;Hampton Catlin's make_resourcerful&quot;, 'http://mr.hamptoncatlin.com/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt;, but right now I prefer resource_controller.&lt;/li&gt;
     &lt;li&gt;Possibly using &lt;%= link_to &quot;Hampton Catlin's HAML&quot;, 'http://haml.hamptoncatlin.com/', :target =&gt; '_new', :rel =&gt; 'nofollow' %&gt; for the views. I've used it before, but I'm already so comfortable with HTML that it really didn't add any value for me. Still, it's a great idea.&lt;/li&gt;
   &lt;/ul&gt;
 &lt;/p&gt;
 &lt;h2&gt;
-  Grab the source from &lt;%= link_to &quot;http://github.com/&quot;, 'http://github.com/' %&gt;
+  Grab the source from &lt;%= link_to &quot;http://github.com/rapind/albumdy&quot;, 'http://github.com/rapind/albumdy' %&gt;
 &lt;/h2&gt;
\ No newline at end of file</diff>
      <filename>app/views/main/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,3 @@
 &lt;li class=&quot;photo_li&quot; id=&quot;photo_&lt;%= photo.id %&gt;&quot;&gt;
-  &lt;%= link_to image_tag(photo.public_filename(:thumb), :size =&gt; '100x100', :alt =&gt; h(photo.title), :title =&gt; h(photo.title)), photo.public_filename, :title =&gt; h(photo.title), :rel =&gt; 'show' %&gt;	
-  &lt;div align=&quot;center&quot;&gt;
-    &lt;%= link_to 'Edit', &quot;#{edit_album_photo_url(photo.album, photo)}?width=315&amp;height=530&quot;, :title =&gt; h(photo.title), :rel =&gt; 'edit' %&gt; | &lt;%= link_to 'Remove', album_photo_path(photo.album, photo), :rel =&gt; 'remove' %&gt;
-  &lt;/div&gt;
+  &lt;%= link_to image_tag(photo.public_filename(:thumb), :size =&gt; '100x100', :alt =&gt; h(photo.title), :title =&gt; h(photo.title)), photo.public_filename, :title =&gt; h(photo.title), :rel =&gt; 'show' %&gt;
 &lt;/li&gt;
\ No newline at end of file</diff>
      <filename>app/views/photos/_photo.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,49 +1,16 @@
 &lt;script type=&quot;text/javascript&quot;&gt;
-	var swfu;
 
-	window.onload = function() {
-		var settings = {
-			flash_url : &quot;/assets/swfupload_f9.swf&quot;,
-			upload_url: &quot;&lt;%= album_photos_path(@album) %&gt;&quot;,
-			file_size_limit : &quot;50 MB&quot;,
-			file_types : &quot;*.*&quot;,
-			file_types_description : &quot;All Images&quot;,
-			file_upload_limit : 50,
-			file_queue_limit : 0,
-			custom_settings : {
-				progressTarget : &quot;fsUploadProgress&quot;,
-				cancelButtonId : &quot;btnCancel&quot;
-			},
-			debug: false,
-
-			// The event handler functions are defined in handlers.js
-			file_queued_handler : fileQueued,
-			file_queue_error_handler : fileQueueError,
-			file_dialog_complete_handler : fileDialogComplete,
-			upload_start_handler : uploadStart,
-			upload_progress_handler : uploadProgress,
-			upload_error_handler : uploadError,
-			upload_success_handler : uploadSuccess,
-			upload_complete_handler : uploadComplete,
-			queue_complete_handler : queueComplete	// Queue plugin event
-		};
-
-		swfu = new SWFUpload(settings);
-     };
+$(function() {
+	
+	// binds lightbox to photo clicks
+  $('#photos a[@rel*=show]').lightBox();
+	
+});
 &lt;/script&gt;
 &lt;h1&gt;
-  Upload Photos for &lt;%= h @album.title %&gt;
+  Photos
 &lt;/h1&gt;
 &lt;hr&gt;
-&lt;p&gt;
-  &lt;%= link_to &quot;Back&quot;, album_path(@album) %&gt;
-&lt;/p&gt;
-&lt;form id=&quot;form1&quot; action=&quot;#&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
-  &lt;div&gt;
-    &lt;input type=&quot;button&quot; value=&quot;Upload Photos&quot; onclick=&quot;swfu.selectFiles()&quot; style=&quot;font-size:8pt; border-width:1px; margin-bottom:10px; padding:2px 3px;&quot; /&gt;
-    &lt;input id=&quot;btnCancel&quot; type=&quot;button&quot; value=&quot;Cancel All Uploads&quot; onclick=&quot;swfu.cancelQueue();&quot; disabled=&quot;disabled&quot; style=&quot;font-size:8pt; border-width:1px; margin-bottom:10px; padding:2px 3px;&quot; /&gt;
-  &lt;/div&gt;
-  &lt;fieldset class=&quot;queue&quot; id=&quot;fsUploadProgress&quot;&gt;
-    &lt;legend&gt;Upload Queue&lt;/legend&gt;
-  &lt;/fieldset&gt;
-&lt;/form&gt;
\ No newline at end of file
+&lt;ul id=&quot;photos&quot;&gt;
+  &lt;%= render :partial =&gt; &quot;photo&quot;, :collection =&gt; @photos %&gt;
+&lt;/ul&gt;
\ No newline at end of file</diff>
      <filename>app/views/photos/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-Show
\ No newline at end of file
+Photo root
\ No newline at end of file</diff>
      <filename>app/views/photos/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -0,0 +1 @@
+User
\ No newline at end of file</diff>
      <filename>app/views/users/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,20 @@
-# SQLite version 3.x
-#   gem install sqlite3-ruby (not necessary on OS X Leopard)
+login: &amp;login
+  adapter: mysql
+  username: root
+  password: 
+  socket: /tmp/mysql.sock
+  
 development:
-  adapter: sqlite3
-  database: db/development.sqlite3
-  timeout: 5000
+  &lt;&lt;: *login
+  database: albumdy_development
 
-# Warning: The database defined as 'test' will be erased and
-# re-generated from your development database when you run 'rake'.
-# Do not set this db to the same as development or production.
 test:
-  adapter: sqlite3
-  database: db/test.sqlite3
-  timeout: 5000
+  &lt;&lt;: *login
+  database: albumdy_test
 
 production:
-  adapter: sqlite3
-  database: db/production.sqlite3
-  timeout: 5000
+  adapter: mysql
+  username: root
+  password: 210474dr44
+  socket: /var/run/mysqld/mysqld.sock
+  database: albumdy
\ No newline at end of file</diff>
      <filename>config/database.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,25 +1,26 @@
 ActionController::Routing::Routes.draw do |map|
 
+  # admin section to manage all users, albums, and photos.
+  # simple management operations means we don't need deeply nested routes.
+  map.namespace :admin do |admin|
+    admin.resources :users, :has_many =&gt; :albums
+    admin.resources :albums, :has_many =&gt; :photos
+    admin.resources :photos
+  end
+  
   # management section where user's manage their albums and photos
   map.namespace :manage do |manage|
-    manage.resources :users do |user|
-      user.resources :albums do |album|
-        album.resources :photos, :collection =&gt; { :thumb =&gt; :get }, :member =&gt; { :update_position =&gt; :put }
-      end
+    manage.resources :users
+    manage.resources :albums do |album|
+      album.resources :photos, :controller =&gt; 'albums/photos', :collection =&gt; { :thumb =&gt; :get }, :member =&gt; { :update_position =&gt; :put }
     end
   end
   
-  # public view of users, their albums and the photos within
-  map.resources :users do |user|
-    user.resources :albums do |album|
-      album.resources :photos
-    end
-  end
+  # public view of users and the albums they own
+  map.resources :users, :has_many =&gt; :albums
   
-  # public view of albums and the photos within
-  map.resources :albums do |album|
-    album.resources :photos
-  end
+  # public view of albums
+  map.resources :albums
   
   # public view of photos
   map.resources :photos</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ class CreateUsers &lt; ActiveRecord::Migration
       
       t.string :full_name, :limit =&gt; 64
       t.string :web_site_url, :limit =&gt; 255
-      t.boolean :visible, :null =&gt; false, :default =&gt; false
+      t.boolean :visible, :null =&gt; false, :default =&gt; true
       t.integer :albums_count, :null =&gt; false, :default =&gt; 0
       
       t.timestamps</diff>
      <filename>db/migrate/001_create_users.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ class CreateAlbums &lt; ActiveRecord::Migration
       t.integer :position, :null =&gt; false, :default =&gt; 1
       t.string :title, :limit =&gt; 255, :null =&gt; false
       t.text :description
-      t.boolean :visible, :null =&gt; false, :default =&gt; false
+      t.boolean :visible, :null =&gt; false, :default =&gt; true
       t.integer :photos_count, :null =&gt; false, :default =&gt; 0
       
       t.timestamps</diff>
      <filename>db/migrate/002_create_albums.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@ class CreatePhotos &lt; ActiveRecord::Migration
       # attachment_fu fields
       t.integer :parent_id, :size, :width, :height
       t.string :content_type, :filename, :thumbnail
-      t.boolean :visible, :null =&gt; false, :default =&gt; false
+      t.boolean :visible, :null =&gt; false, :default =&gt; true
       
       t.timestamps
     end</diff>
      <filename>db/migrate/003_create_photos.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +0,0 @@
-Use this README file to introduce your application and point to useful places in the API for learning more.
-Run &quot;rake doc:app&quot; to generate API documentation for your models, controllers, helpers, and libraries.</diff>
      <filename>doc/README_FOR_APP</filename>
    </modified>
    <modified>
      <diff>@@ -113,8 +113,8 @@ textarea {
   list-style-type: none;
   float:left;
   margin-bottom:22px;
-  margin-left:11px;
-  margin-right:11px;
+  margin-left:13px;
+  margin-right:13px;
 }
 
 .album_cover {
@@ -131,9 +131,9 @@ textarea {
   border:1px solid #2A2A2A;
   float:left;
   margin-bottom:22px;
-  margin-left:11px;
-  margin-right:11px;
-  padding:3px 3px 8px;
+  margin-left:6px;
+  margin-right:5px;
+  padding:3px 3px 3px;
 }
 
 </diff>
      <filename>public/stylesheets/application.css</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/controllers/albums/photos_controller.rb</filename>
    </removed>
    <removed>
      <filename>app/controllers/manage/users/albums/photos/photos_controller.rb</filename>
    </removed>
    <removed>
      <filename>app/controllers/manage/users/albums_controller.rb</filename>
    </removed>
    <removed>
      <filename>app/controllers/users/albums/photos_controller.rb</filename>
    </removed>
    <removed>
      <filename>app/views/albums/_form.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/albums/edit.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/albums/new.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/photos/_form.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/photos/edit.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/photos/thumb.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/users/change_password.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/users/edit.html.erb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>7834dc12f23914fc851f22e608b7fc853ee2b519</id>
    </parent>
  </parents>
  <author>
    <name>Dave Rapin</name>
    <email>dave@rapin.com</email>
  </author>
  <url>http://github.com/rapind/albumdy/commit/5f75e02b2c7924d3da0054e6860cc1177e288ed1</url>
  <id>5f75e02b2c7924d3da0054e6860cc1177e288ed1</id>
  <committed-date>2008-08-04T06:57:39-07:00</committed-date>
  <authored-date>2008-08-04T06:57:39-07:00</authored-date>
  <message>readme updated</message>
  <tree>7a9c7f257385fc8d79ee6661a9973ec5c177b49e</tree>
  <committer>
    <name>Dave Rapin</name>
    <email>dave@rapin.com</email>
  </committer>
</commit>
