similar to: attachment_fu and form_tag for multiple models?

Displaying 20 results from an estimated 3000 matches similar to: "attachment_fu and form_tag for multiple models?"

2007 Dec 08
3
Uploading photos using facebook & attachment_fu
Hi All, I''m trying to use a form to upload a photo that I will save using attachment_fu. I''m very new to Facebookr so I apologize if this is covered somewhere, but I''m kind of stumped. Here''s what I''m doing now: <% facebook_form_for(:my_object, :url => { :action => ''upload_photo'', :id => params[:id] }, :html => {
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here
2007 Mar 28
1
attachment_fu & update_attributes... bug?
It seems that attachment_fu is a pretty popular plugin (it''s great), but I''ve been having a terrible time trying to figure out an issue when using "update_attributes". I''m storing files on the file system rather than in a database. It seems that when "update_attributes" is called with a new file, upload_data= tries to copy a file that
2010 Apr 24
2
problem using attachment_fu with S3
Hi, My S3 bucket is located in the US I have attachment_fu working when using file system storage I have sw-swf upload plugin working with my S3 account but I can not get attachment_fu to work with S3 storage. the error I get is : AWS::S3::RequestTimeout in Upload filesController#create Your socket connection to the server was not read from or written to within the timeout period. Idle
2007 Mar 11
4
Faking it... import local files into attachment_fu
Hello, I''m working on an import utility that will match the functionality of uploading an object of a model that uses attachment_fu for thumbnailing, etc. Rather than uploading the file via a form, I want to populate the params[:image][:uploaded_data] with data from a file already on the server''s file system. So far, I''ve been able to copy to an instance of Tempfile
2007 Apr 27
3
attachment_fu content_type problem
Hi all.... Admittedly I''m new to Rails and trying to find my way but I''m having an issue with uploading documents with attachment_fu. I have a form where I''m uploading multiple attachments (using AJAX to add file_filed_tags). That seems to work pretty well. The problem is I can''t seem to get the content_type to work as I would expect. For example, if I use
2011 Feb 18
1
why 'Template missing' error with form_tag?
ROR newbie here... I''m trying to build a form to upload a CSV file, then parse and store the data. I have debugged this code up this point, but now when I browse to my csv file, and click Upload, I get this error: "Missing template uploads/process_file.html.erb in view path..." Here is my view (in /uploads/new.html.erb) <% form_tag ({:action =>
2006 May 31
4
acts_as_attachment , someone using it?
Hi, i just found the acts_as_attachment plugin for image upload, seems sogood but i cant find any docs about it, if someone here using it can give some references or working examples about the plugin that will be excellent. So what you wanna rails today? -- Posted via http://www.ruby-forum.com/.
2007 Sep 18
2
Making attachment_fu polymorphic
I am working on a small model mixin called attachment_kung to make attachment_fu polymorphic, so you no longer need a different table and Model class for every associated attachment (Productimage, Ad_doc, etc). All you really need is one model and table to handel all your attachments - in some cases, anyway. I have the code working, but have run into one small hitch that I can''t seem to
2010 Jun 15
3
RoutingError
hi, can anyone help me. i want to create an url to invoke create action of a controller. routes.rb has the routes. But i am getting error at line 23. i have @user variable. user_contact_path(@user.id) I want generate url as : users/3/contacts to invoke contacts controller''s create action ---------------------------------------------------------------------------------
2008 Jan 21
5
attachment_fu and story runner, any updates
I''m trying to write a story for a Rails app which involves using the attachment_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#600831 So it seems that there''s a hole in Rails integration testing and multipart form posting. David offered to incorporate a patch to story runner at the end of the
2007 Dec 13
4
Attachment_fu problems on updates
On the creation of a member the member''s picture uploads as it should. However, when updating the member, while selecting a new picture, an error is thrown: can''t convert nil into String RAILS_ROOT: /Users/chris/Documents/Projects/Rails/CommunityCMS/trunk Application Trace | Framework Trace | Full Trace
2009 Jul 24
1
Attachment_fu - watermark tmp file before saved to S3
Hi there, I''d like to use RMagick to watermark an image in the tmp directory before Attachment_fu saves it to Amazon S3. I took a look at the callbacks available in attachment_fu. There''s an ''after_attachment_saved'' method but this would be too late, and a ''before_thumbnail_saved'' but this is no good because it''s for thumbnails. I
2008 Jan 30
0
Making an object the same as is returned by file_field_tag
I''m using attachment_fu, and can make an attachment object (a Logo, which is basically an image file) fine using the tempfile that is returned from the file_field_tag on a form. However, i also need to make some from some files that are saved locally, in my public folder. I''m making a Tempfile object using the local file, but when i pass it to attachment_fu, it fails and
2008 Nov 11
1
attachment_fu, aws-s3 and backgroundrb
Hi, I''m using attachment_fu to store files on amazon s3. A background job is currently performing the upload and I''m having a strange issue where the very first file uploaded/created (attachment_fu uploads when creating the object) does not get uploaded. The db information is all all good. The model and attachment model associated with it are saved to the db, but the file is
2008 Sep 15
1
[attachment_fu] Allways triggering after_attachment_saved callback
Hi, I use attachment_fu in one of my apps and recently I''ve realized that udpates are taking too much time. After some debugging I''ve found that attachment_fu is calling after_attachment_saved callback no mather if attachemnt has changed or not. For example this code: after_attachment_saved do |photo| logger.info "after_attachment_saved" end # in console - always
2007 Apr 18
3
nil.symbolize_keys -- error with attachment_fu
I''ve spent at least 2 hours on this one problem. On my local machine in my controller I have this: def new @page_title = "New User" @user = User.new @photo = Photo.new end All is good. Now, on the remote server I get an error when accessing the ''new'' view. If I remove @photo = Photo.new from the controller then the error goes away. This same error
2007 May 07
1
attachment_fu seems to be searching the wrong location for my images
I just installed attachment_fu and for some reason, it seems to be looking in the wrong location for my images. I have a Product model that belongs to a photo model. the photo model has the attachment_fu installed and configured like so: class Photo < ActiveRecord::Base has_attachment :content_type => :image, #Allow standard image formats :path_prefix
2007 Nov 05
0
Ajax - attachment_fu - rmagick and iframe
Hello I am uploading images ajax-attachment_fu-rmagick and an iframe and me climb correctly, but when I finish the process and the driver will I redirect_to enc_url I recharge layer ajax. I tried with redirect_to enc_url :partial => ''m_content'' and redirect_to enc_url, :update => ''m_content''. But neither I recharge ... rhtml ------ <% form_for(photo,
2007 Dec 31
2
episode 73 resulting in error: undefined method `stringify_keys!' for "33":String
I''m working with a similar model in Episode 73, (my scenario is editing multiple pictures for a product using attachment_fu). And I''m getting an error when I try the technique suggested: ./views/admin/_form.rhtml <% for picture in product.pictures %> <% fields_for "product[picture_attributes][]", picture do | picture_form| %> Title: <%=