From f3297a9ea775ea2e32ee294a6ab5962041ad5759 Mon Sep 17 00:00:00 2001 From: Ernest Ellingson Date: Sat, 27 Sep 2008 15:53:22 -0400 Subject: [PATCH] Fixed javascript bug on file upload, added data base info on files and tagged files. --- vendor/plugins/fckeditor/app/models/fyle.rb | 7 +++++++ .../fckeditor/db/migrate/001_create_fyles.rb | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 vendor/plugins/fckeditor/app/models/fyle.rb create mode 100644 vendor/plugins/fckeditor/db/migrate/001_create_fyles.rb diff --git a/vendor/plugins/fckeditor/app/models/fyle.rb b/vendor/plugins/fckeditor/app/models/fyle.rb new file mode 100644 index 0000000..4091347 --- /dev/null +++ b/vendor/plugins/fckeditor/app/models/fyle.rb @@ -0,0 +1,7 @@ + class Fyle < ActiveRecord::Base + acts_as_taggable + def self.get_mime_type(file) + r=self.find_by_file_name(file); + r.mime_type + end + end diff --git a/vendor/plugins/fckeditor/db/migrate/001_create_fyles.rb b/vendor/plugins/fckeditor/db/migrate/001_create_fyles.rb new file mode 100644 index 0000000..0e06cd3 --- /dev/null +++ b/vendor/plugins/fckeditor/db/migrate/001_create_fyles.rb @@ -0,0 +1,13 @@ +class CreateFyles < ActiveRecord::Migration + def self.up + create_table "fyles", :force => true do |t| + t.string "mime_type" + t.string "file_name" + t.timestamps + end + end + + def self.end + drop_table "fyles" + end +end