From 3504ea9acde1249ab55340348947b5f5416e72b3 Mon Sep 17 00:00:00 2001 From: Josh Adams Date: Sat, 17 Jan 2009 12:47:39 -0600 Subject: [PATCH] accidentally had undone some fckeditor stuff (the fyle model), added that back --- vendor/plugins/fckeditor/app/models/fyle.rb | 8 ++++++++ .../fckeditor/db/migrate/001_create_fyles.rb | 14 ++++++++++++++ 2 files changed, 22 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..f48bebe --- /dev/null +++ b/vendor/plugins/fckeditor/app/models/fyle.rb @@ -0,0 +1,8 @@ +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..f8f8702 --- /dev/null +++ b/vendor/plugins/fckeditor/db/migrate/001_create_fyles.rb @@ -0,0 +1,14 @@ +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