similar to: acts_as_attachment save file in folder named after models parent id

Displaying 20 results from an estimated 9000 matches similar to: "acts_as_attachment save file in folder named after models parent id"

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/.
2006 Sep 08
4
Does acts_as_attachment :storage => :db_system work?
I found the post about needing to install acts_as_attachement_1_1_6 if you are not on edge rails. But I am having trouble getting db_system storage to work. As far as I can tell in from the database, things are working, but I don''t see how my model table hooks up with the db_files table so I am having trouble altering the image_tag from the tutorial
2007 Aug 18
0
RSpec and acts_as_attachment
Hey guys, I''m getting a weird error when trying to test something like the following. It''s a model that is using acts_as_attachment but the weird thing is the equivalent Test::Unit case passes. Does anyone have any ideas? Best, Dave # it was a Test::Unit case first def test_should_be_invalid_without_file UserFile.any_instance.expects(:with_image).never
2007 Oct 24
6
how to subclass active record to call a method on all save and destroy actions
I''m looking for a way to subclass active record (I''ll refer to the subclass I want to create as NewActiveRecord) so that I can call different methods on a save or destroy action on all models which sub class NewActiveRecord I dont want to use before_save or any of the other regular call back methods as I want to be able to use these call backs in the models which subclass
2006 Aug 12
0
acts_as_attachment next steps
http://weblog.techno-weenie.net/articles/acts_as_attachment is an excellent introduction, but I am a newbie and need the next step outlined for me: How would I implement a controller/view (form) for the model that the attachments model belongs to? (The content items that have pictures attached) Or should I just make the content item model acts_as_attachment instead ? Does anyone know of a
2007 May 05
0
acts_as_attachment - no thumbnails?
the full-size pics upload OK, but no thumbs or resizing. There are no errors or exceptions that I can see, just not getting any thumbnails. The DB column ''thumbnail'' is always NULL rmagick-1.15.6 is freshly installed. I have the :thumbnails stuff setup per http://weblog.techno-weenie.net/articles/acts_as_attachment/thumbnailing using a model like this: class EventPic
2007 Dec 13
0
acts_as_attachment -> attachment_fu, db_system -> file_system
Hi I currently have an app running with acts_as_attachment and db_system. I would like to convert it to attachment_fu and file_system. Has anyone done this? Are there any pitfalls? I am aware that the change from acts_as_attachment to attachment_fu is just a matter of replacing the plugins, but I am wondering about the switch from db_system to file_system. Is it as easy? Just fishing for
2006 Jun 11
2
Problem with Acts_As_Attachment
Hi, I have installed the acts_as_authenticated plugin from technoweenie, but when I run the tests I get an error (running windoze) -- create_table(:attachments, {:force=>true}) c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'': no such file to load -- sqlite (MissingSourceFile) I found the require statement in test/abstract_unit.rb
2007 Feb 22
0
Cropping images with RMagick after uploading with acts_as_attachment
Hi, I''m using acts_as_attachment to create thumbnails in a filesystem (no problem there), but I''m having a rough time figuring out how modify the image to crop it, and then put it back into the filesystem. I think that I can pull the image OK and modify the Image OK with RMagick. So really I just need a pointer on putting it back into the filesystem as a modified thumbnail,
2007 Feb 27
1
Trying to retrieve a model from the session that uses acts_as_attachment - segmentation fault in mongrel
I am using acts_as_attachement on my Photo model to upload a photo. I have a wizard-like set of pages that the user can step through. Rather than save the photo to the db/filesystem I want to save it to the session until the user hits save. Saving to the session appears to work fine, however, when I try to retrieve anything from the session afterwards, I get:
2006 Oct 13
1
Edge rails, single table inheritance and keeping multiple classes in a single file
So is the official stance as per edge rails that multiple class definitions must go into separate files? I was trying to use STI with acts_as_attachment, to have all my attachment classes go into a single file, for example: attachment.rb class Attachment < ActiveRecord::Base end class UserPicture < Attachment belongs_to :user, :foreign_key => ''owner_id''
2006 Nov 20
7
Acts as attachement
Hi guys Question about acts as attachment still getting the following error undefined method `content_type'' I have set everything up according to the following page however i am still have trouble http://weblog.techno-weenie.net/articles/acts_as_attachment One thing, I have wanted to add this to an existing model in my system. I have not used the... script/generate
2010 Jun 10
4
rails removes newlines and spaces from ajax requests
Hi I have an app which posts an ajax request with with text area content, but when it does post it it gets all the newlines and multiple spaces removed (need to use multiple spacing for use with markdown code snippets) I''ve created a sample app which you can see here http://test.42horizons.com/test, View it in IE 8 and both requests remove line spaces and new lines, view it in firefox
2023 Dec 30
2
Help request: Parsing docx files for key words and appending to a spreadsheet
Hi Eric Thanks for that. That seems to fix one problem (the lack of a separator), but introduces a new one when I complete the function Calum proposed:Error in docx_summary() : argument "x" is missing, with no default The whole code so far looks like this: # Load libraries library(tcltk) library(tidyverse) library(officer) filepath <- setwd(tk_choose.dir()) filename <-
2023 Dec 30
3
Help request: Parsing docx files for key words and appending to a spreadsheet
An update: Running this block of code: # Load libraries library(tcltk) library(tidyverse) library(officer) filepath <- setwd(tk_choose.dir()) filename <- "Now they want us to charge our electric cars from litter bins.docx" #full_filename <- paste0(filepath, filename) full_filename <- paste(filepath, filename, sep="/") if (!file.exists(full_filename)) { ?
2007 Feb 14
1
cron like behaviour?
Hi I have previously used railscron for server-side manipulation of the database but had a heap of trouble working with it. BackgrounDRB was suggested to me by a friend. I upload some files via acts_as_attachment and these go lie in a dir structure that i desire. What I want from the background process is to periodically (not user initiated) do some file-structure manipulation i.e. I want to
2006 Oct 03
1
recipe for a myspace type clone?
loginGenrator for accounts and custom views ferret for search engine acts_as_attachment with imagick backroundRb for DB cleanup anything else one would use for a social networking site? and would the above plugins be ''good enough'' for a much smaller instance of myspace? looking to have around 1000 or so members. -- Posted via http://www.ruby-forum.com/.
2007 Mar 02
2
ActMethods has been removed from the module tree ???
Hello, I wrote a light weight version of acts_as_attachment and this has been working fine for some time now (about a week). Now i get the title error: ActMethods has been removed from the module tree but is still active! I have updated edge rails a few times as my project uses active_resource. The closest thing ive found is an AAA post on beast forum: http://beast.caboo.se/forums/2/topics/664
2008 Sep 25
1
Will acts_as_paranoid work with attachment_fu?
I''ve got a problem in that users are deleting a paranoid model through the application, including dependents. Some of these dependents are paranoid too, but not the attachments. (I''m using DB file storage.) I need to be able to un-delete these things and I''m now wondering if acts_as_paranoid will work with models that use attachment_fu? If so, in what model to I add the
2007 Feb 06
1
Attachment_fu ImageScience FreeImage thumbnail quality
I''ve tried migrating acts_as_attachment to attachment_fu (just to see if I could replace RMagick with ImageScience+FreeImage), but the quality of the thumbnails is just horrendous, blurred beyond recognition (downscaling a 1280x1024 to a few considerably smaller thumbnails). Changing attachment_fu to use RMagick again and the thumbnails were crispy sharp again. I was wondering