Displaying 15 results from an estimated 15 matches for "add_image".
2006 Mar 04
7
Get ID after save
This is simple (I am sure) but how do you get the id of the inserted
element after the element has been save?
I thought it was something like this:
@product = Product.new(params[:product]
if @product.save
add_image(product.id, params["image"])
flash[:notice] = ''Product was successfully created.''
redirect_to :action => ''list_products''
end
But that isn''t it
--
Posted via http://www.ruby-forum.com/.
2006 Mar 11
2
Customising FCKeditor
I would like to customise my FCKeditor-instance so that when the "add
image" button is pressed, it opens my own add_image popup.
In this popup i would handle the image upload/image browser/etc. tasks
with rails.
How can I open the popup and pass the picture information from there
back to FCKeditor''s textarea?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to
get it. I''m going to have a page where you can upload x amount of images at
once. Lets say 10 images need to be uploaded, all with a caption.
I''d like to have a browse button to choose the file, then the caption. Now,
if I put 10 of them in one form, fill them all out and submit, I get
2013 Oct 01
2
Bug#603391: Bug#603391: Workaround PyGrub issue
....py", line 467, in <module>
g = Grub2ConfigFile(sys.argv[2])
File "GrubConf.py", line 359, in __init__
_GrubConfigFile.__init__(self, fn)
File "GrubConf.py", line 179, in __init__
self.parse()
File "GrubConf.py", line 418, in parse
self.add_image(Grub2Image(title, img))
File "GrubConf.py", line 325, in __init__
_GrubImage.__init__(self, title, lines)
File "GrubConf.py", line 94, in __init__
self.reset(lines)
File "GrubConf.py", line 110, in reset
self._parse(lines)
File "GrubConf.py&quo...
2006 Mar 05
2
How to clean up this code?
...{:controller => ''image'', :action =>
''destroy'', :id => image.id},
:confirm => "Are you sure?") %>
</div>
<% end %>
<% end %>
<%=link_to_function ''add image'',
''add_image_upload_field(image_field_number); image_field_number++;'', :id
=> "add_image" %>
------------------------------------------------------------
--- add_image_upload_field js function ----------
function add_image_upload_field(id) {
var image_field = ''<input typ...
2009 Jul 08
2
RuntimeError (JPEG marker not found!):
...:/Ruby/lib/ruby/gems/1.8/gems/pdf-writer-1.1.8/lib/pdf/writer/
graphics/imageinfo.rb:85:in `i
nitialize''
C:/Ruby/lib/ruby/gems/1.8/gems/pdf-writer-1.1.8/lib/pdf/writer/
graphics.rb:574:in `new''
C:/Ruby/lib/ruby/gems/1.8/gems/pdf-writer-1.1.8/lib/pdf/writer/
graphics.rb:574:in `add_image''
lib/purchase_pdf.rb:52:in `draw_background_image''
lib/purchase_pdf.rb:40:in `draw''
lib/purchase_pdf.rb:17:in `draw''
lib/purchase_pdf.rb:16:in `each''
lib/purchase_pdf.rb:16:in `draw''
lib/purchase_pdf.rb:13:in `draw''
lib/p...
2013 Oct 01
0
Bug#603391: Bug#603391: Workaround PyGrub issue
...ubConf.py", line 354, in __init__
> _GrubConfigFile.__init__(self, fn)
> File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 174, in __init__
> self.parse()
> File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 413, in parse
> self.add_image(Grub2Image(title, img))
> File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 320, in __init__
> _GrubImage.__init__(self, title, lines)
> File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 89, in __init__
> self.reset(lines)
> File &quo...
2013 Oct 01
0
Bug#603391: Bug#603391: Workaround PyGrub issue
...gt;
> g = Grub2ConfigFile(sys.argv[2])
> File "GrubConf.py", line 359, in __init__
> _GrubConfigFile.__init__(self, fn)
> File "GrubConf.py", line 179, in __init__
> self.parse()
> File "GrubConf.py", line 418, in parse
> self.add_image(Grub2Image(title, img))
> File "GrubConf.py", line 325, in __init__
> _GrubImage.__init__(self, title, lines)
> File "GrubConf.py", line 94, in __init__
> self.reset(lines)
> File "GrubConf.py", line 110, in reset
> self._parse(lines...
2013 Sep 29
2
Bug#603391: Workaround PyGrub issue
...en-4.1/lib/python/grub/GrubConf.py", line 354, in __init__
_GrubConfigFile.__init__(self, fn)
File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 174, in __init__
self.parse()
File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 413, in parse
self.add_image(Grub2Image(title, img))
File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 320, in __init__
_GrubImage.__init__(self, title, lines)
File "/usr/lib/xen-4.1/lib/python/grub/GrubConf.py", line 89, in __init__
self.reset(lines)
File "/usr/lib/xen-4.1/lib/py...
2012 Jul 06
1
Bug#680479: xen-utils-4.0: pygrub does not support grub2 submenus
...if l.startswith("}"):
if img is None:
+ if submenu:
+ submenu -= 1
+ continue
raise RuntimeError, "syntax error: closing brace without menuentry"
self.add_image(Grub2Image(title, img))
2010 Nov 13
0
Bug#603391: pygrub: unintelligible error messages
...file, fs)
File "/usr/lib/xen-4.0/bin/pygrub", line 205, in __init__
self.read_config(file, fs)
File "/usr/lib/xen-4.0/bin/pygrub", line 413, in read_config
self.cf.parse(buf)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 282, in parse
self.add_image(GrubImage(title, img))
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 132, in __init__
_GrubImage.__init__(self, title, lines)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 85, in __init__
self.reset(lines)
File "/usr/lib/xen-4.0/lib/pyt...
2006 Jul 22
17
Problem getting form_remote_tag to work with image upload
Hey guys,
I am trying to pass the parameters for the file being upload, but the
params[] are not being passed. Ive read through some posts and realize
this is an issue with RoR.
I read through some of the posts and someone suggested using:
http://svn.kylemaxwell.com/form_remote_upload/trunk/
I tried to install it, and although I thought I installed it correctly,
it doesn''t work.
2010 Oct 06
1
Bug#599243: xen-utils-4.0: pygrub does not understand grub2 partition types (e.g. (hd0, msdos1) instead of (hd0, 1))
...file, fs)
File "/usr/lib/xen-4.0/bin/pygrub", line 205, in __init__
self.read_config(file, fs)
File "/usr/lib/xen-4.0/bin/pygrub", line 413, in read_config
self.cf.parse(buf)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 400, in parse
self.add_image(Grub2Image(title, img))
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 316, in __init__
_GrubImage.__init__(self, title, lines)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 85, in __init__
self.reset(lines)
File "/usr/lib/xen-4.0/lib/py...
2011 Oct 01
2
Bug#643953: xen-utils-4.0: pygrub can not parse empty "root" statement in menu.lst
...549, in run_grub
g = Grub(file, fs)
File "./pygrub", line 205, in __init__
self.read_config(file, fs)
File "./pygrub", line 413, in read_config
self.cf.parse(buf)
File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line 284, in parse
self.add_image(GrubImage(title, img))
File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line 134, in __init__
_GrubImage.__init__(self, title, lines)
File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line 87, in __init__
self.reset(lines)
File "/usr/lib/x...
2012 Jul 19
2
[PATCH] pygrub: add syslog support to pygrub
...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
we''re being given a raw config file rather than...