救援异常。导轨3
|
我正在尝试在视图中捕获异常。我在.html.erb文件中使用rgmagick:
<%= f.label :image, \"image file\" %>
<%= f.file_field :image %>
我试图通过这种方式在文件不正确但不正确的情况下捕获异常:
<% begin %>
<p>
<%= f.label :image, \"image file\" %>
<%= f.file_field :image %>
</p>
</div>
<div class=\"actions\">
<%= f.button :submit %>
</div>
<% rescue %>
<% puts \'error\' %>
<% end %>
任何想法??
非常感谢!
没有找到相关结果
已邀请:
1 个回复
博沮富教全