Updating to use Rails 2.1.2. Moving the gem dependancies to the config/environment.rb file. Moving the vendor/plugins externals into our svn.
This commit is contained in:
parent
38f4e17865
commit
252c2f7022
46 changed files with 3919 additions and 7 deletions
28
vendor/plugins/file_column/lib/file_compat.rb
vendored
Normal file
28
vendor/plugins/file_column/lib/file_compat.rb
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
module FileColumn
|
||||
|
||||
# This bit of code allows you to pass regular old files to
|
||||
# file_column. file_column depends on a few extra methods that the
|
||||
# CGI uploaded file class adds. We will add the equivalent methods
|
||||
# to file objects if necessary by extending them with this module. This
|
||||
# avoids opening up the standard File class which might result in
|
||||
# naming conflicts.
|
||||
|
||||
module FileCompat # :nodoc:
|
||||
def original_filename
|
||||
File.basename(path)
|
||||
end
|
||||
|
||||
def size
|
||||
File.size(path)
|
||||
end
|
||||
|
||||
def local_path
|
||||
path
|
||||
end
|
||||
|
||||
def content_type
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue