suite
This commit is contained in:
parent
52c9c53562
commit
502a8631cc
@ -9,8 +9,8 @@
|
||||
params[:file_folder_id] = params[:file_folder_id] || 1
|
||||
|
||||
@file_folder = FileFolder.find(params[:file_folder_id])
|
||||
@file_folders = FileFolder.all(:order => :name)
|
||||
@data_files = DataFile.all(:order => "created_at DESC", :conditions => {:file_folder_id => @file_folder.id})
|
||||
@file_folders = FileFolder.order("name").all
|
||||
@data_files = DataFile.order("created_at DESC").where(:file_folder_id => @file_folder.id).all
|
||||
@data_file = DataFile.new(:file_folder_id => @file_folder.id)
|
||||
if request.xhr?
|
||||
render :layout => false
|
||||
|
@ -8,8 +8,8 @@
|
||||
params[:album_id] = params[:album_id] || 1
|
||||
|
||||
@album = Album.find(params[:album_id])
|
||||
@albums = Album.all(:order => :name)
|
||||
@image_files = ImageFile.all(:order => "created_at DESC", :conditions => {:album_id => @album.id})
|
||||
@albums = Album.order("name").all
|
||||
@image_files = ImageFile.where(:album_id => @album.id).order("created_at DESC").all
|
||||
@image_file = ImageFile.new(:album_id => @album.id)
|
||||
if request.xhr?
|
||||
render :layout => false
|
||||
|
@ -9,7 +9,7 @@ class Public::TestimoniesController < ApplicationController
|
||||
|
||||
if params[:slug]
|
||||
testimony_id = params[:slug].split('-')[0].to_i
|
||||
testimony = Testimony.find(:first, :conditions => {:id => testimony_id})
|
||||
testimony = Testimony.where(:id => testimony_id).first
|
||||
|
||||
if testimony
|
||||
@testimony = testimony
|
||||
|
Loading…
x
Reference in New Issue
Block a user