Anexos aninhados

This commit is contained in:
2008-04-22 12:02:51 -03:00
parent 0695c44b21
commit ba62ba336c
10 changed files with 80 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ require 'yaml'
class ApplicationController < ActionController::Base
include AuthenticationSystem
helper :all
before_filter :startup
around_filter :set_timezone

View File

@@ -30,6 +30,7 @@ class AttachmentsController < ApplicationController
def create
@attachment.course_id = @course.id
@attachment.path = params[:attachment][:path]
@attachment.description = params[:attachment][:description]
unless params[:attachment][:file].kind_of?(String)
@attachment.file = params[:attachment][:file]
@@ -54,6 +55,7 @@ class AttachmentsController < ApplicationController
end
def update
@attachment.path = params[:attachment][:path]
@attachment.description = params[:attachment][:description]
unless params[:attachment][:file].kind_of?(String)
@attachment.file = params[:attachment][:file]