similar to: Problem with the image

Displaying 20 results from an estimated 10000 matches similar to: "Problem with the image"

2006 Jul 17
6
3 newbie questions
hey all, I have 3 tables like this: Images (id,name) Tags (id,name) ImagesTags(imageid,tagid) in my image model I do a "has_and_belongs_to_many :tags" but to make it work I need to rename ImagesTags(imageid,tagid) to Images_Tags(image_id,tag_id). My question is that given that I can''t rename the table, is there any way to make it work with the original names? Second question:
2006 Jul 02
3
difficult view code logic
this one really has me stumped... <%= user.in_out == "In" ? {image_tag url_for_file_column("personnel", "image", "thumb")} if user.image : user.in_out %> What I am wanting to do... if user.in_out == "In", load their thumbnail if it exists, load public/images/in.jpg if not, or else load public/images/out.jpg Can someone help with the
2006 Apr 17
8
file upload
This is probably me having an issue with the mvc way of living.. .I''m used to perl/php scripting... I''ve got a photo blog I''m making... and in past iterations of this website, I''d just name the photos after the id of the entry. For instance: /photos/id.jpg /photos/id_thumb.jpg However, I''m having trouble finding an easy way to do this with rails.
2007 Mar 04
3
Dynamically setting the image directory used by attachment_fu
It took me a while to figure this out and I don''t see any wiki pages for attachment_fu so I figure I would just post this here. I didn''t like the way attachment_fu by default creates directories under a given directory for a specific class e.g. item_image/1/img_1.jpg item_image/1/img_1_thumb.jpg item_image/2/img_2.jpg item_image/2/img_2_thumb.jpg item_image/3/img_3.jpg
2006 Feb 25
2
Ruby Interface Recommendations Photo Gallery Creation?
Hi, I''m looking to create a gallery index page of thumbnail images which point to their associated images galleries. Also, I would like to organize the images from left to right and top to bottom. Furthermore, I would like to limit the number of thumbnail images on the page. I guess that I''m needing some type of horizontal looping interface for both the thumbnail index page
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
2006 Jun 06
8
How do I wrap a <%= link to %> around an image?
I''ve got a bunch of dynamically generated link paths that I want to use to link some dynamically-generated image paths. Specifically, I want to link thumbnails in a gallery to the larger images. But I''m stymied by Rails'' syntax. I can''t figure out how to do this. I tried this: <%= link_to(image_tag("../../images/photos/photo.photogroup/TN_
2006 Jan 04
5
check if a file exists?
Hello all! I have a list of people on a page, and some of this people have pictures of them stored on the web server. So I have an image tag like this on my page: <%= image_tag "/images/people/" + person.pers_id.to_s + ".jpg" %> But not all have a picture, so if the file for pers_id=1899 does not exist, i would like to display a custom image for that guy. How can I do
2008 May 15
9
Squeegy Fleximage Routing
Hello people, I''m using squeegy fleximage for my site right now and having some difficulty to achieve some things. Updates photos are saved in created at date generated fom like : '' /images/2008/05/14/22.png '' . However this route is not accessible through the browser and I don''t know how to add it in my routes.rb knowing that the dates will change everyday.
2006 May 12
3
file_column error
Hmm, I''m using file_column and going by this tutorial, the files upload ok and I can see the fields updated in the database, but I am getting this error: "Trying to access file_column, but primary key got lost." Thanks in advance -- Posted via http://www.ruby-forum.com/.
2006 Apr 11
1
Variable not evaluating, returning nil object
There is probably a simple answer to this, but I''m fairly new to rails. Any idea why the variable "b" won''t evaluate on this line? <%=image_tag(thumbnail(items[b].catalognum, 192),:alt=>items[b].view_description,:border=>0)%> If I change it to: <%=image_tag(thumbnail(items[0].catalognum,
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
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
2006 Sep 04
9
RMagick Image.read doesn't... read!
I''ve a controller with an action that should read an image file from a specified path and do some operations on it (mainly, resize it). I try to read the image through this line of code (the image is placed in applicationname\public\images. img = Magick::Image.read("world.jpg") The fact is that whenever I open that page, the browser freezes and I have to restart my
2010 Oct 01
20
Paperclip not executing FFMPEG properly
Im using a customs processor to run ffmpeg on a video to create a thumbnail. So far so good. Except when I do: cmd = "-i #{@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv" success = Paperclip.run(''ffmpeg'', cmd) Console is reporting: ffmpeg ''-i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream, 16824,1.mpeg -f flv -s 320x240
2008 Jul 29
1
can't crop images using ImageMagick
I''m using Attachment_Fu to save several thumbnails of a photo (resizing with ImageMagick) But when I try to crop them, nothing seems to happen to the file I want to drop and no error messages. I check the file timestamp of the thumbnail I want to crop and it looks updated. What''s strange is that ALL the other thumbnails and the original image''s file timestamps are
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
2006 May 19
9
Resize uploaded image file without creating temp file?
Hi, I need to take a single uploaded image file and save three resized versions of it, a thumbnail, normal and large version. I was planning on doing this in my model by having an array of geometry strings and looping through them, each time saving a new image object resized to the correct geometry. I know that file column does similar stuff, but I would prefer to have a separate database row
2010 Mar 20
4
Displaying an image in a Rails form_for
Hi, I''ve got a public\images\DownArrow.jpg and app\views\expenses\new.html.erb that want to present this image in the following context: <p> <%= f.label :vendor %><br /> <%= f.text_field :vendor %> <%= f.image "DownArrow.jpg" %> <br> <%= select_tag "test", options_for_select(@current_vendors.collect {
2006 Apr 28
2
file_column with polymorphic table relationship?
Hello, I''m just starting out with both Rails and Ruby, so I hope this isn''t too simple of a question - but I''ve been struggling to find a solution. I''m using the file_column plugin to handle image uploads and thumbnail generation. In addition, I''ve wrapped the image into a polymorphic table so I can have uploaded images associated with multiple