def list
if params[:display_name]
- @this_user = User.find_by_display_name(params[:display_name], :conditions => "visible = 1")
+ @this_user = User.find_by_display_name(params[:display_name], :conditions => {:visible => true})
if @this_user
@title = @this_user.display_name + "'s diary"
def rss
if params[:display_name]
- user = User.find_by_display_name(params[:display_name], :conditions => "visible = 1")
+ user = User.find_by_display_name(params[:display_name], :conditions => {:visible => true})
if user
@entries = DiaryEntry.find(:all, :conditions => ['user_id = ?', user.id], :order => 'created_at DESC', :limit => 20)
end
def view
- user = User.find_by_display_name(params[:display_name], :conditions => "visible = 1")
+ user = User.find_by_display_name(params[:display_name], :conditions => {:visible => true})
if user
@entry = DiaryEntry.find(:first, :conditions => ['user_id = ? AND id = ?', user.id, params[:id]])