Anexos aninhados

This commit is contained in:
2009-09-06 21:00:20 -03:00
11 changed files with 108 additions and 27 deletions

View File

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

View File

@@ -34,6 +34,7 @@ class AttachmentsController < ApplicationController
def create
@attachment.course_id = @course.id
@attachment.path = params[:attachment][:path]
@attachment.description = params[:attachment][:description]
@attachment.file_name = "blank"
unless params[:attachment][:file].nil?
@@ -56,6 +57,7 @@ class AttachmentsController < ApplicationController
end
def update
@attachment.path = params[:attachment][:path]
@attachment.description = params[:attachment][:description]
unless params[:attachment][:file].nil?
@attachment.file = params[:attachment][:file]