search for: new_image

Displaying 8 results from an estimated 8 matches for "new_image".

2007 Mar 19
1
HOWTO: Multiple file upload with file_column
...type="file" /></td> </tr> <tr> <td><br /></td> </tr> <% end %> </table> CONTROLLER: params[:picture].each { |attr, value| unless value[:image_data].blank? new_image = Image.new new_image.person_id = session[:person_id] new_image.title = value[:title] new_image.image = value[:image_data] new_image.save end...
2013 Sep 18
2
Accessing model attributes in ActiveSupport::Concern module
...uot;images", image_dir, pic_link)) return true else return false end rescue return true #an error occured but when the image does not exist we still return true end end return true end def replace_image(new_image) File.open(Rails.root.join("public", "images", image_dir, new_image.original_filename), "wb") do |f| if f.write new_image.read delete_image pic_link = new_image.original_filename return true #everything went fine else...
2006 Mar 09
6
rmagick and captcha
Has anyone implemented a captcha with ruby on rails and rmagick? I tried this example: http://wiki.rubyonrails.com/rails/pages/HowtoSecureFormsWithNoisyImages but I got an error: undefined method `size'' for #<NoisyImage:0x34d8070> Thank you -------------------------------------------------- Rodrigo Dominguez ? Iplan Networks ???????????????Datos Personales
2006 Jan 24
3
problem starting domains
...essfully. However, quite a few of my domUs don''t start properly. I get the correct Started Domain messages... but then the domain doesn''t "go anywhere", meaning it uses .3 cpu time, then never any more. I create the domUs by dd if=/dev/xen/base_image of=/dev/xen/ new_image, after creating a new_image using lvcreate of the same size as the base image. I''ve verified that these images actually exist. Looking through the log from xend.log below, i see an error about / dev/hda1 (the root device given to the domU on the command line, which you can also see...
2009 Apr 20
1
RJS sporadic error message
I have this form that allows a user to enter a username and save it, assocciating your profile with theirs via an id. A list gets updated and a partial is displayed. The problem is that when I hit the submit button to this form to make this all happened I (sometimes, but more often then not) get an RJS error that reads: TypeError: Cannot set property ''innerHTML'' of bull. I hot
2006 Mar 14
5
How to display different images using ajax?
Hi! On my page i display one full size image and a list of thumbnails. I''d like to change the full size image with a full size version of a thumbnail, after clicking on one of them. How to write controller action, so it would update the image without reloading the whole page? It''s easy with text, but how to reload an image? -- Posted via http://www.ruby-forum.com/.
2012 Aug 07
3
Barcode Generating With Label On Canvas by using Barby gem
...#39;' require ''barby/outputter/prawn_outputter'' require ''pdf/writer'' module Barby class RmBarcode < ActiveRecord::Base register :to_image_with_data def to_image_with_data #Make canvas bigger canvas = Magick::ImageList.new canvas.new_image(full_width , full_height + 10) canvas << to_image canvas = canvas.flatten_images #Make the text text = Magick::Draw.new text.font_family = ''helvetica'' text.pointsize = 14 text.gravity = Magick::SouthGravity text.annotate(canvas...
2012 Jul 19
2
[PATCH] pygrub: add syslog support to pygrub
...t;return"): @@ -396,7 +397,7 @@ class Grub: lines.append(ret) continue - # if we got boot, then we want to boot the entered image + # if we got boot, then we want to boot the entered image img = self.cf.new_image("entered", lines) self.cf.add_image(img) self.selected_image = len(self.cf.images) - 1 @@ -409,16 +410,16 @@ class Grub: def read_config(self, fn, fs = None): """Read the given file to parse the config. If fs = None, then...