similar to: Help with the acts_as_attachment plugin

Displaying 20 results from an estimated 100000 matches similar to: "Help with the acts_as_attachment plugin"

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:
2007 Apr 08
1
acts_as_attachment save file in folder named after models parent id
This is probably pretty easy, but I''m still a newb as far as ruby and rails goes. I am using the acts_as_attachment and would like to know how I go about setting the path that the file is saved to so that it is saved in a folder named after the models parent model id Thanks in advance Tony --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
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
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,
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 Apr 21
3
attachment_fu thumbnails
howdy! I had the problem that attachment_fu didn''t make a thumbnail, but everything else worked. I read this post http://www.ruby-forum.com/topic/104213 and added a parent_id column. now I get the following error when I trie to add a photo: undefined method `find_or_initialize_by_thumbnail_and_parent_id'' for Photo:Class my code is: class Photo < ActiveRecord::Base
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 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
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
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
2006 Oct 15
1
acts_as_attachment and tagging?
hi, i read this: http://www.johnnysthoughts.com/2006/08/27/ruby-on-rails-using-full-text-search-with-tagging/ does this mean i do not have to install the acts_as_taggable plugin? all i need to do is something like this is my model class? acts_as_ferret :field=>[''name'', :tag_list] -- Posted via http://www.ruby-forum.com/.
2007 Mar 28
3
attachment_fu Not Resizing
Hello, Recently attachment_fu stopped resizing images for me. I''m puzzled because before today it was resizing them and I don''t know what''s changed. Here''s my code: class Product < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :max_size => 18.megabytes,
2009 Feb 22
2
Mysql error unknown column 'columns.user_id'
Had this error when trying to add comments to another user''s photo. ActiveRecord::StatementInvalid in User photosController#show Mysql::Error: Unknown column ''comments.user_id'' in ''on clause'': SELECT photos.`id` AS t0_r0, photos.`user_id` AS t0_r1, photos.`title` AS t0_r2, photos.`body` AS t0_r3, photos.`created_at` AS t0.... I did create a user_id
2008 Jan 10
0
BUG? has_many :through makes funny queries
So I have this structure. class Gallery < ActiveRecord::Base belongs_to :owner, :polymorphic => true has_many :folders, :order => ''slug'', :dependent => :destroy class Folder < ActiveRecord::Base has_many :photos, :dependent => :destroy, :conditions => "parent_id IS NULL" belongs_to :gallery class User < ActiveRecord::Base has_one
2008 Jul 30
1
Couldn't find Photo with ID=index
Hi all, I need help in this problem. - i have a model class named Photo, a controller Photos. - when typing the URL http://localhost:3000/photos Rails calls the default index method. - but when typing http://localhost:3000/photos/index error saying "Couldn''t find Photo with ID=index" pops up, i cant even imagine why. - my Rails version is 2.1.0 thanks in advance yours,
2007 Aug 15
0
Rails error on generated app
I created a very simple app with a database table for image file names and tags to be associated with the image. When I generate the scaffolded app it has an error in it. There is an uninitialized constant of the same name as the model class but singular instead of plural. I.E. Model class Photos < ActiveRecord::Base and in the completely generated app I get an error when creating a row in
2007 Feb 10
1
calling destory on HABTM clear
I know this is probably stupidly simple, but I can''t seem to figure it out. I have a many-to-many association using HABTM. Im trying to clear all the stuff in the join table and call destroy on all the joined items. For example if I have a many to many for albums and photos, def method album=Album.find(4) album.photos.clear # NOW HOW DO I DESTROY ALL THOSE PHOTOS? end The things I
2008 Nov 24
2
Namespacing conventions
I compared the output from ``rake routes'''' for each solution below, and they both produce the exact same routes. Is one solution preferred over the over? # Solution #1: map.resource :account do |account| account.resources :properties, :controller => ''account/properties'' account.resources :photos, :controller =>
2009 Feb 19
1
ActiveRecord-2.2.2, association preloading, joins and order parameter weirdness
Hello RoR Groupies, I''m seeing some weird ActiveRecord-2.2.2 SQL generation when doing eager association/preloading and using joins and ordering by said join table. Here''s an example: class Photo < ActiveRecord::Base end class User < ActiveRecord::Base has_one :headshot, :class_name => "Photo" end class Mail < ActiveRecord::Base belongs_to :user end