class Mugshot < ActiveRecord::Base
has_attachment :content_type => :image,
:storage => :file_system,
:processor => :MiniMagick,
:max_size => 10.megabytes,
:resize_to => '320*200',
:thumbnails => { :thumb => [50, 50] },
:path_prefix => 'public/images/mugshots'
validates_as_attachment
end
<h1>New mugshot</h1>
<%= error_messages_for :mugshot %>
<% form_for(:mugshot, :url => mugshots_path,
:html => { :multipart => true }) do |f| -%>
<p>
<label for="mugshot">Upload A Mugshot:</label>
<%= f.file_field :uploaded_data %>
</p>
<p>
<%= submit_tag 'Create' %>
</p>
<% end -%>
<%= link_to 'New mugshot', new_mugshot_path %>
<h1>Most Wanted</h1>
<% for mugshot in @mugshots -%>
<%= link_to image_tag(mugshot.public_filename(:thumb)), mugshot.public_filename %>
<% end -%>
那个高手帮我看看怎么回事??
分享到:
相关推荐
AT_Attachment_with_Packet_Interface_-_7_Volume_3
_storage_emulated_0_android_data_com.tencent.mm_MicroMsg_517174082dbc007f25c5bd836bdd4446_attachment_段润昌_648.wps
ATA接口的详细解读,working draft proposed American National Standard for Information Systems - ATA (ATAttachment) 78页
_storage_emulated_0_android_data_com.tencent.mm_MicroMsg_7cef220aad1703aed0c0f4bb62bea90d_attachment_1_实验四(1) .docx
个人博客:https://blog.csdn.net/MissXy_/article/details/83347968 参考使用;
Information Technology - AT Attachment with Packet Interface - 6 (ATA/ATAPI-6)ATA_ATAPI-6标准规范,驱动开发参考文档
生成四角、八角、十六角的方位标志。方便做图例。
用于LTE中下行物理链路中CRC添加的程序
very interesting matlab hev model
西门子840d数控系统说明。对方的更多更好
attachment_doc是一个SquirrelMail插件,允许用户使用其浏览器查看电子邮件中的文档附件。 该插件将文档转换为html格式。 目前支持MSWord(DOC)和可移植文档格式(PDF)!
Attachment 1_chazhi.xlsx
Attachment_Project 附件项目
1649480820617212_attachment.cgi
attachment_repo 我要分享的一些文件
This standard specifies the AT Attachment Interface between host systems and storage devices. It provides a common attachment interface for systems manufacturers, system integrators, software ...
Salesforce Attachment mover是用Node.js编写的命令行应用程序,执行3种操作 从CSV文件导入附件 将附件导出到本地zip文件 执行附件的组织迁移 要运行此程序,请打开命令提示符,指向安装应用程序的目录并运行: ...
Filament winding path generation
send_email_attachment
fdafdaafdasfdafdfdsafdadfdsafdsa