class ProfileController < ApplicationController
def show
username = params[:username]
@user = User.find_by_username(username)
if @user
@title = "Profile for #{username}"
user_id = @user.id
@albums = Album.find(:all, :conditions => ["user_id = ?", user_id])
I have managed to display the index of albums for a given user on their profile page. Moving to the show action for an album displays the pictures in the given album. How can I put the show action of the album on the user's profile page?