Chris's first commit at Fri Jan 28 2011 10:14:32 GMT+0800 (CST)

This commit is contained in:
ihower committed 2011-04-13 18:19:51 +08:00
1 parent 554aa0a95d
commit 19a7d51e60
145 files changed
+12742 -893

No files matched your search

+8 -8
View File
@@ -2,24 +2,24 @@ class Admin::AssetsController < ApplicationController
layout "admin"
before_filter :authenticate_user!
def show
@asset = Asset.find(params[:id])
send_data @asset.data.file.read, :filename => @asset.filename,
:type => @asset.data.content_type,
:disposition => 'inline' # or 'attachment'
end
before_filter :is_admin?
def index
@assets = Asset.all
@assets = Asset.all.entries
end
def show
#TODO
end
def edit
@asset = Asset.find(params[:id])
session[:last_page] = get_go_back || admin_assets_url
end
def new
@asset = Asset.new
session[:last_page] = get_go_back || admin_assets_url
end
def create