now i am trying to upload a pdf file to the server ,but i get nothing,when i try to get the url of the attached file,i got some missing.png file name. Is there some where i can set to tell the paperclip that i just want to upload pdf files but not pictures? great thanks... here is my class settings
============================================model file
class RdBenefit < ActiveRecord::Base
belongs_to :reim_detail
has_attached_file :details
validates_attachment_content_type :doc, :content_type => ['application/doc']
end
======================================schema
create_table "rd_benefits", :force => true do |t|
t.integer "sequence"
t.date "reim_date"
t.integer "fee_time_span"
t.integer "people_count"
t.decimal "amount", :precision => 10, :scale => 0
t.integer "reim_detail_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "details_file_name"
t.string "details_content_type"
t.integer "details_file_size"
t.datetime "details_updated_at"
end
==========================gemfile
gem "paperclip"
=========================view file
<%= form_for @doc_head,:remote=>true,:html => { :multipart => true } do |f| %>