Fiile_column persistent across different forms

is there a way to keep the file_column field in the form persistent
across diffferent view templates ?

In my controller (same controller for both views) i do

@post = Post.new

in the view i do

form_step1.rhtml

<%= file_column_field “post”, “image” %>
<% if @post[“image”] %>
<%= image_tag url_for_file_column(“post”, “image”) %>
<% end %>

form_step2.rhtml

<% if @post[“image”] %>
<%= image_tag url_for_file_column(“post”, “image”) %>

<br
<% end %>

and in my model i do

file_column :image, :magick => { :geometry => “320x240” }
validates_file_format_of :image, :in => [“image/jpeg”]
validates_filesize_of :image, :in => 0.kilobytes…50.kilobytes

does anybody see what I am missing here ?

thanks
adam

hmm now i get “Rails Application Failed to Start Properly…” very
wierd behavior.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs