I''ve install the ''file_column'' plugin properly
following instructions
from the Rails Cookbook and other sources on the web.  The file_column
files are located under vendor\plugins\file_column.  I then add this
to my controller:
file_column :photo1
where photo1 is the column in my table that will hold the image.
then in my views I have a multipart form that has functionality to
upload the image:
<p><label for="table_photo1">Photo</label><br
/>
<%= file_column_field "table", "photo1" %></p>
I restarted my webserver, but every time I try to connect to the view
with that multipart form I get the error:
"undefined method ''file_column'' for
<<mycontrollername>>::Class
RAILS_ROOT: /MyApp/config/...
#{RAILS_ROOT}/app/controllers/mycontroller.rb:5
/usr/bin/monrel_rails:16 in ''load''
/usr/bin/mongrel_rails:16
Line 5 in mycontroller.rb is where I use the call to
''file_column :photo1''.  It''s like the plugin is not
really getting
loaded even though it is sitting in my plugin directory.  There are a
ton of threads on the web about this problem ... but I haven''t found a
solution yet.  Any thoughts out there would be *greatly*
appreciated!!  I really want to see this work!
Thanks in advance!
Leah
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Mark Reginald James
2007-Aug-08  09:03 UTC
Re: file_column plugin: get undefined method ''file_column'' error
LAB wrote:> I''ve install the ''file_column'' plugin properly following instructions > from the Rails Cookbook and other sources on the web. The file_column > files are located under vendor\plugins\file_column. I then add this > to my controller: > > file_column :photo1 > > where photo1 is the column in my table that will hold the image.The "file_column :photo1" line should go in your "Table" model, not in the controller. -- We develop, watch us RoR, in numbers too big to ignore. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
LAB
2007-Aug-08  13:55 UTC
Re: file_column plugin: get undefined method ''file_column'' error
GENIUS! ;-) Thanks! On Aug 8, 5:03 am, Mark Reginald James <m...-bzGI/hKkdgQnC9Muvcwxkw@public.gmane.org> wrote:> LAB wrote: > > I''ve install the ''file_column'' plugin properly following instructions > > from the Rails Cookbook and other sources on the web. The file_column > > files are located under vendor\plugins\file_column. I then add this > > to my controller: > > > file_column :photo1 > > > where photo1 is the column in my table that will hold the image. > > The "file_column :photo1" line should go in your "Table" model, > not in the controller. > > -- > We develop, watch us RoR, in numbers too big to ignore.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---