Forum: Ruby on Rails File Column installation

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C70d253e33d13e1de4bb82fd06fffdb3?d=identicon&s=25 wborgon (Guest)
on 2005-12-03 20:52
(Received via mailing list)
I've installed File-column -- placed into vendor plugins directory,
added the model, added a controller, and created a view with submit
form.  Yet, when I view the page, everything looks correct, but when
submitting the file, nothing is actually stored in the database -- and
there are no errors reported.

 Am I missing something?

 Sample upload view follows:
 <%= form_tag({}, { :multipart => true}) %>
 <%= file_column_field "entry", "image" %>
 <%= submit_tag 'Upload' %>
 <%= end_form_tag %>

 Model:
 class Entry < ActiveRecord::Base
   file_column :image
 end

 Controller:
 class EntryController < ApplicationController
 end

 Database:
 CREATE TABLE entries (
   id int(11) NOT NULL auto_increment,
   image varchar(200) default NULL,
   file varchar(200) NOT NULL,
   PRIMARY KEY  (id)
 )

 Thanks
 -W
A7db9ec803b5895ae5f916a74e2db329?d=identicon&s=25 lists (Guest)
on 2005-12-03 23:44
(Received via mailing list)
What action does the form submit to?

You need an action that creates an instance, populates it from the form
and
then saves it. Maybe you have one already and didn¹t include it here?



From: Wolfgang Borgon <wborgon@yahoo.com>
Reply-To: <rails@lists.rubyonrails.org>
Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
To: <rails@lists.rubyonrails.org>
Subject: [Rails] File Column installation

I've installed File-column -- placed into vendor plugins directory,
added
the model, added a controller, and created a view with submit form.
Yet,
when I view the page, everything looks correct, but when submitting the
file, nothing is actually stored in the database -- and there are no
errors
reported.

 Am I missing something?

 Sample upload view follows:
 <%= form_tag({}, { :multipart => true}) %>
 <%= file_column_field "entry", "image" %>
 <%= submit_tag 'Upload' %>
 <%= end_form_tag %>

 Model:
 class Entry < ActiveRecord::Base
   file_column :image
 end

 Controller:
 class EntryController < ApplicationController
 end

 Database:
 CREATE TABLE entries (
   id int(11) NOT NULL auto_increment,
   image varchar(200) default NULL,
   file varchar(200) NOT NULL,
   PRIMARY KEY  (id)
 )

 Thanks
 -W



 Yahoo! Personals
 Let fate take it's course directly to your email.
 See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >
C70d253e33d13e1de4bb82fd06fffdb3?d=identicon&s=25 wborgon (Guest)
on 2005-12-04 02:06
(Received via mailing list)
You're right, the action is missing. I thought between the view, the
model, and the plugin,  the neceesary ops would have been taken care of.
Would would be a suitable action?

Hunter Hillegas <lists@lastonepicked.com> wrote:Re: [Rails] File Column
installation     What action does the form submit to?

 You need an action that creates an instance, populates it from the form
and then saves it. Maybe you have one already and didnÂ?t include it
here?



---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
 Reply-To: <rails@lists.rubyonrails.org>
 Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
 To: <rails@lists.rubyonrails.org>
 Subject: [Rails] File Column installation

 I've installed File-column -- placed into vendor plugins directory,
added the model, added a controller, and created a view with submit
form.  Yet, when I view the page, everything looks correct, but when
submitting the file, nothing is actually stored in the database -- and
there are no errors reported.

  Am I missing something?

  Sample upload view follows:
  <%= form_tag({}, { :multipart => true}) %>
  <%= file_column_field "entry", "image" %>
  <%= submit_tag 'Upload' %>
  <%= end_form_tag %>

  Model:
  class Entry < ActiveRecord::Base
    file_column :image
  end

  Controller:
  class EntryController < ApplicationController
  end

  Database:
  CREATE TABLE entries (
    id int(11) NOT NULL auto_increment,
    image varchar(200) default NULL,
    file varchar(200) NOT NULL,
    PRIMARY KEY  (id)
  )

  Thanks
  -W



---------------------------------
 Yahoo! Personals
  Let fate take it's course directly to your email.
  See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >

---------------------------------
_______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails
  _______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails




Hunter Hillegas <lists@lastonepicked.com> wrote:Re: [Rails] File Column
installation     What action does the form submit to?

You need an action that creates an instance, populates it from the form
and then saves it. Maybe you have one already and didnÂ?t include it
here?



---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
 Reply-To: <rails@lists.rubyonrails.org>
 Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
 To: <rails@lists.rubyonrails.org>
 Subject: [Rails] File Column installation

 I've installed File-column -- placed into vendor plugins directory,
added the model, added a controller, and created a view with submit
form.  Yet, when I view the page, everything looks correct, but when
submitting the file, nothing is actually stored in the database -- and
there are no errors reported.

  Am I missing something?

  Sample upload view follows:
  <%= form_tag({}, { :multipart => true}) %>
  <%= file_column_field "entry", "image" %>
  <%= submit_tag 'Upload' %>
  <%= end_form_tag %>

  Model:
  class Entry < ActiveRecord::Base
    file_column :image
  end

  Controller:
  class EntryController < ApplicationController
  end

  Database:
  CREATE TABLE entries (
    id int(11) NOT NULL auto_increment,
    image varchar(200) default NULL,
    file varchar(200) NOT NULL,
    PRIMARY KEY  (id)
  )

  Thanks
  -W



---------------------------------
 Yahoo! Personals
  Let fate take it's course directly to your email.
  See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >

---------------------------------
_______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails
  _______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
A7db9ec803b5895ae5f916a74e2db329?d=identicon&s=25 lists (Guest)
on 2005-12-04 02:18
(Received via mailing list)
File column simply makes dealing with files easier. If you want to do
database access of any kind with ActiveRecord, you still need to save
the
object.

    def create
        @instance = MyModel.new(params[:instance_form_name])
        if @ instance .save
            redirect_to :action => 'index'
        else
            #error occurred
            render :action => 'index'
        end
    end

Or something like that.

From: Wolfgang Borgon <wborgon@yahoo.com>
Reply-To: <rails@lists.rubyonrails.org>
Date: Sat, 3 Dec 2005 17:03:56 -0800 (PST)
To: <rails@lists.rubyonrails.org>
Subject: Re: [Rails] File Column installation

You're right, the action is missing. I thought between the view, the
model,
and the plugin,  the neceesary ops would have been taken care of.  Would
would be a suitable action?


Hunter Hillegas <lists@lastonepicked.com> wrote:
>  Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
>   Sample upload view follows:
>   Controller:
>
> <http://us.rd.yahoo.com/evt=36106/*http://personals...
>
>
> _______________________________________________
>  Rails mailing list
>  Rails@lists.rubyonrails.org
>  http://lists.rubyonrails.org/mailman/listinfo/rails
>   _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails



Hunter Hillegas <lists@lastonepicked.com> wrote:
>  Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
>   Sample upload view follows:
>   Controller:
>
> <http://us.rd.yahoo.com/evt=36106/*http://personals...
>
>
> _______________________________________________
>  Rails mailing list
>  Rails@lists.rubyonrails.org
>  http://lists.rubyonrails.org/mailman/listinfo/rails
>   _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails



 Yahoo! Personals
 Let fate take it's course directly to your email.
 See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >
C70d253e33d13e1de4bb82fd06fffdb3?d=identicon&s=25 wborgon (Guest)
on 2005-12-04 02:30
(Received via mailing list)
So taking the filecolumn example of model Entry, with filecolumn image,
the second line in your example would be:
  @entry = Entry.new(params[:entry])
 ?

Hunter Hillegas <lists@lastonepicked.com> wrote:Re: [Rails] File Column
installation     File column simply makes dealing with files easier. If
you want to do database access of any kind with ActiveRecord, you still
need to save the object.

     def create
         @instance = MyModel.new(params[:instance_form_name])
         if @ instance .save
             redirect_to :action => 'index'
         else
             #error occurred
             render :action => 'index'
         end
     end

 Or something like that.

---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
 Reply-To: <rails@lists.rubyonrails.org>
 Date: Sat, 3 Dec 2005 17:03:56 -0800 (PST)
 To: <rails@lists.rubyonrails.org>
 Subject: Re: [Rails] File Column installation

 You're right, the action is missing. I thought between the view, the
model, and the plugin,  the neceesary ops would have been taken care of.
Would would be a suitable action?


 Hunter Hillegas <lists@lastonepicked.com> wrote:
 Re: [Rails] File Column installation     What action does the form
submit to?

  You need an action that creates an instance, populates it from the
form and then saves it. Maybe you have one already and didnÂ?t include it
here?




---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
  Reply-To: <rails@lists.rubyonrails.org>
  Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
  To: <rails@lists.rubyonrails.org>
  Subject: [Rails] File Column installation

  I've installed File-column -- placed into vendor plugins directory,
added the model, added a controller, and created a view with submit
form.  Yet, when I view the page, everything looks correct, but when
submitting the file, nothing is actually stored in the database -- and
there are no errors reported.

   Am I missing something?

   Sample upload view follows:
   <%= form_tag({}, { :multipart => true}) %>
   <%= file_column_field "entry", "image" %>
   <%= submit_tag 'Upload' %>
   <%= end_form_tag %>

   Model:
   class Entry < ActiveRecord::Base
     file_column :image
   end

   Controller:
   class EntryController < ApplicationController
   end

   Database:
   CREATE TABLE entries (
     id int(11) NOT NULL auto_increment,
     image varchar(200) default NULL,
     file varchar(200) NOT NULL,
     PRIMARY KEY  (id)
   )

   Thanks
   -W




---------------------------------
 Yahoo! Personals
   Let fate take it's course directly to your email.
   See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >
<http://us.rd.yahoo.com/evt=36106/*http://personals...


---------------------------------
_______________________________________________
  Rails mailing list
  Rails@lists.rubyonrails.org
  http://lists.rubyonrails.org/mailman/listinfo/rails
   _______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails



 Hunter Hillegas <lists@lastonepicked.com> wrote:
 Re: [Rails] File Column installation     What action does the form
submit to?

 You need an action that creates an instance, populates it from the form
and then saves it. Maybe you have one already and didnÂ?t include it
here?




---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
  Reply-To: <rails@lists.rubyonrails.org>
  Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
  To: <rails@lists.rubyonrails.org>
  Subject: [Rails] File Column installation

  I've installed File-column -- placed into vendor plugins directory,
added the model, added a controller, and created a view with submit
form.  Yet, when I view the page, everything looks correct, but when
submitting the file, nothing is actually stored in the database -- and
there are no errors reported.

   Am I missing something?

   Sample upload view follows:
   <%= form_tag({}, { :multipart => true}) %>
   <%= file_column_field "entry", "image" %>
   <%= submit_tag 'Upload' %>
   <%= end_form_tag %>

   Model:
   class Entry < ActiveRecord::Base
     file_column :image
   end

   Controller:
   class EntryController < ApplicationController
   end

   Database:
   CREATE TABLE entries (
     id int(11) NOT NULL auto_increment ,
     image varchar(200) default NULL,
     file varchar(200) NOT NULL,
     PRIMARY KEY  (id)
   )

   Thanks
   -W




---------------------------------
 Yahoo! Personals
   Let fate take it's course directly to your email.
   See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >
<http://us.rd.yahoo.com/evt=36106/*http://personals...


---------------------------------
_______________________________________________
  Rails mailing list
  Rails@lists.rubyonrails.org
  http://lists.rubyonrails.org/mailman/listinfo/rails
   _______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails



---------------------------------
 Yahoo! Personals
  Let fate take it's course directly to your email.
  See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >

---------------------------------
_______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails
  _______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
A7db9ec803b5895ae5f916a74e2db329?d=identicon&s=25 lists (Guest)
on 2005-12-04 02:47
(Received via mailing list)
Looking at the example, that seems to be correct.

If this stuff isn¹t familiar to you I would suggest going through one of
the
many Rails tutorials out there ­ this stuff should be covered in just
about
any basic tutorial.


From: Wolfgang Borgon <wborgon@yahoo.com>
Reply-To: <rails@lists.rubyonrails.org>
Date: Sat, 3 Dec 2005 17:27:04 -0800 (PST)
To: <rails@lists.rubyonrails.org>
Subject: Re: [Rails] File Column installation

So taking the filecolumn example of model Entry, with filecolumn image,
the
second line in your example would be:
  @entry = Entry.new(params[:entry])
 ?

Hunter Hillegas <lists@lastonepicked.com> wrote:
>              render :action => 'index'
>  Subject: Re: [Rails] File Column installation
>>   You need an action that creates an instance, populates it from the form and
>>   Subject: [Rails] File Column installation
>>    <%= form_tag({}, { :multipart => true}) %>
>>    class EntryController < ApplicationController
>>    Thanks
>> <http://us.rd.yahoo.com/evt=36106/*http://personals...
>>  Rails@lists.rubyonrails.org
>> then saves it. Maybe you have one already and didn¹t include it here?
>>
>>    <%= file_column_field "entry", "image" %>
>>    end
>>    -W
>> <http://us.rd.yahoo.com/evt=36106/*http://personals...
>>  http://lists.rubyonrails.org/mailman/listinfo/rails
> <http://us.rd.yahoo.com/evt=36106/*http://personals...
>
>
> _______________________________________________
>  Rails mailing list
>  Rails@lists.rubyonrails.org
>  http://lists.rubyonrails.org/mailman/listinfo/rails
>   _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails



 Yahoo! Personals
 Single? There's someone we'd like you to meet.
 Lots of someones, actually. Yahoo! Personals
<http://us.rd.yahoo.com/evt=36108/*http://personals.yahoo.com >
C70d253e33d13e1de4bb82fd06fffdb3?d=identicon&s=25 wborgon (Guest)
on 2005-12-04 03:23
(Received via mailing list)
Using the code below, I get the following error:
    Errno::EEXIST in   Entry#create
File exists - /var
     RAILS_ROOT: /var/www/html/app/public/../config/..
               Application Trace |            Framework Trace |
Full Trace
/usr/lib64/ruby/1.8/fileutils.rb:243:in `mkdir'
/usr/lib64/ruby/1.8/fileutils.rb:243:in `fu_mkdir'
/usr/lib64/ruby/1.8/fileutils.rb:217:in `mkpath'
/usr/lib64/ruby/1.8/fileutils.rb:215:in `mkpath'
/usr/lib64/ruby/1.8/fileutils.rb:201:in `mkpath'
#{RAILS_ROOT}/vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:25:in
`init_options'
#{RAILS_ROOT}/vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:539:in
`file_column' #{RAILS_ROOT}/app/models/entry.rb:2
#{RAILS_ROOT}/app/controllers/entry_controller.rb:8:in `create'


/usr/lib64/ruby/1.8/fileutils.rb:243:in `mkdir'
/usr/lib64/ruby/1.8/fileutils.rb:243:in `fu_mkdir'
/usr/lib64/ruby/1.8/fileutils.rb:217:in `mkpath'
/usr/lib64/ruby/1.8/fileutils.rb:215:in `mkpath'
/usr/lib64/ruby/1.8/fileutils.rb:201:in `mkpath'
#{RAILS_ROOT}/vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:25:in
`init_options'
#{RAILS_ROOT}/vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:539:in
`file_column'
/usr/lib64/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:207:in
`load'
#{RAILS_ROOT}/vendor/plugins/engines/lib/dependencies_extensions.rb:45:in
`require_or_load'
/usr/lib64/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:22:in
`depend_on'
/usr/lib64/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:178:in
`require_dependency'
/usr/lib64/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:194:in
`const_missing'
 /usr/lib64/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/base.rb:841:in
`perform_action_without_filters'
/usr/lib64/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/filters.rb:332:in
`perform_action_without_benchmark'
/usr/lib64/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue' /usr/lib64/ruby/1.8/benchmark.rb:293:in
`measure'
/usr/lib64/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
/usr/lib64/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/rescue.rb:82:in
`perform_action'
/usr/lib64/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/base.rb:365:in
`process_without_session_management_support'
/usr/lib64/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/session_management.rb:116:in
`process'
/usr/lib64/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:38:in
`dispatch'
 /var/www/html/bokidoki/public/dispatch.cgi:10


/usr/lib64/ruby/1.8/fileutils.rb:243:in `mkdir'
/usr/lib64/ruby/1.8/fileutils.rb:243:in `fu_mkdir'
/usr/lib64/ruby/1.8/fileutils.rb:217:in `mkpath'
/usr/lib64/ruby/1.8/fileutils.rb:215:in `mkpath'
/usr/lib64/ruby/1.8/fileutils.rb:201:in `mkpath'
#{RAILS_ROOT}/vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:25:in
`init_options'
#{RAILS_ROOT}/vendor/plugins/rails_file_column/plugins/file_column/trunk/lib/file_column.rb:539:in
`file_column'
#{RAILS_ROOT}/app/models/entry.rb:2





This error occured while loading the following files:
   entry.rb

 Any ideas?

Wolfgang Borgon <wborgon@yahoo.com> wrote: So taking the filecolumn
example of model Entry, with filecolumn image, the second line in your
example would be:
  @entry = Entry.new(params[:entry])
 ?

Hunter Hillegas <lists@lastonepicked.com> wrote:Re: [Rails] File Column
installation     File column simply makes dealing with files easier. If
you want to do database access of any kind with ActiveRecord, you still
need to save the object.

     def create
         @instance = MyModel.new(params[:instance_form_name])
         if @ instance .save
             redirect_to :action => 'index'
         else
             #error occurred
             render :action => 'index'
         end
     end

 Or something like that.

---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
 Reply-To: <rails@lists.rubyonrails.org>
 Date: Sat, 3 Dec 2005 17:03:56 -0800 (PST)
 To: <rails@lists.rubyonrails.org>
 Subject: Re: [Rails] File Column installation

 You're right, the action is missing. I thought between the view, the
model, and the plugin,  the neceesary ops would have been taken care of.
Would would be a suitable action?


 Hunter Hillegas <lists@lastonepicked.com> wrote:
 Re: [Rails] File Column installation     What action does the form
submit to?

  You need an action that creates an instance, populates it from the
form and then saves it. Maybe you have one already and didnÂ?t include it
here?




---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
  Reply-To: <rails@lists.rubyonrails.org>
  Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
  To: <rails@lists.rubyonrails.org>
  Subject: [Rails] File Column installation

  I'v e installed File-column -- placed into vendor plugins directory,
added the model, added a controller, and created a view with submit
form.  Yet, when I view the page, everything looks correct, but when
submitting the file, nothing is actually stored in the database -- and
there are no errors reported.

   Am I missing something?

   Sample upload view follows:
   <%= form_tag({}, { :multipart => true}) %>
   <%= file_column_field "entry", "image" %>
   <%= submit_tag 'Upload' %>
   <%= end_form_tag %>

   Model:
   class Entry < ActiveRecord::Base
     file_column :image
   end

   Controller:
   class EntryController < ApplicationController
   end

   Database:
    CREATE TABLE entries (
     id int(11) NOT NULL auto_increment,
     image varchar(200) default NULL,
     file varchar(200) NOT NULL,
     PRIMARY KEY  (id)
   )

   Thanks
   -W




---------------------------------
 Yahoo! Personals
   Let fate take it's course directly to your email.
   See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >
<http://us.rd.yahoo.com/evt=36106/*http://personals...


---------------------------------
_______________________________________________
  Rails mailing list
  Rails@lists.rubyonrails.org
  http://lists.rubyonrails.org/mailman/listinfo/rails
   _______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails



 Hunter Hillegas <lists@lastonepicked.com> wrote:
 Re: [Rails] File Column installation     What action does the form
submit to?

 You need an action that creates an  instance, populates it from the
form and then saves it. Maybe you have one already and didnÂ?t include it
here?




---------------------------------
From: Wolfgang Borgon <wborgon@yahoo.com>
  Reply-To: <rails@lists.rubyonrails.org>
  Date: Sat, 3 Dec 2005 11:52:04 -0800 (PST)
  To: <rails@lists.rubyonrails.org>
  Subject: [Rails] File Column installation

  I've installed File-column -- placed into vendor plugins directory,
added the model, added a controller, and created a view with submit
form.  Yet, when I view the page, everything looks correct, but when
submitting the file, nothing is actually stored in the database -- and
there are no errors reported.

   Am I missing something?

   Sample upload view follows:
   <%= form_tag({}, { :multipart => tr  ue})  %>
   <%= file_column_field "entry", "image" %>
   <%= submit_tag 'Upload' %>
   <%= end_form_tag %>

   Model:
   class Entry < ActiveRecord::Base
     file_column :image
   end

   Controller:
   class EntryController < ApplicationController
   end

   Database:
   CREATE TABLE entries (
     id int(11) NOT NULL auto_increment ,
     image varchar(200) default NULL,
     file varchar(200) NOT NULL,
     PRIMARY KEY  (id)
   )

   Thanks
   -W




---------------------------------
 Yahoo! Personals
   Let fate take it's course  directly to your email.
   See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >
<http://us.rd.yahoo.com/evt=36106/*http://personals...


---------------------------------
_______________________________________________
  Rails mailing list
  Rails@lists.rubyonrails.org
  http://lists.rubyonrails.org/mailman/listinfo/rails
   _______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails



---------------------------------
 Yahoo! Personals
  Let fate take it's course directly to your email.
  See who's waiting for you Yahoo! Personals
<http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com >

---------------------------------
_______________________________________________
 Rails mailing list
 Rails@lists.rubyonrails.org
 http://lists.rubyonrails.org/mailman/listinfo/rails
  _______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails




---------------------------------
 Yahoo! Personals
  Single? There's someone we'd like you to meet.
  Lots of someones, actually. Yahoo!
Personals_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.