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