Displaying 8 results from an estimated 8 matches for "image_filename".
Did you mean:
image_file_name
2006 Feb 19
2
Sortable list (scriptalicious) and updating database
...ecord::Base
end
Views: show_sort_album.rhtml (in album)
<ul id="photo-list">
<% @photos.each do |photo| %>
<li id="item_<%= photo.id %>"> <%= photo.name %>
<img width="100" height="75" src="/images/thumbs/<%=
photo.image_filename %>"/>
</li>
<%end%>
</ul>
<%= sortable_element ''photo-list'',
:url => { :action => "sort" },
:complete => visual_effect(:highlight, ''photo-list'')
%>
A layout file includes a necessary javascript tags. The...
2006 Mar 05
2
How to clean up this code?
...mage
params[:images].length.times do
# check if it was sent
if(params[:images][uploaded_image_number.to_s][:image_url].size
!= 0)
# don''t know yet how to get file extension :)
ext = ''jpg''
# create new filename
image_filename =
"#{@product.id}-#{save_image_number.to_s}.#{ext}"
# add new name to the database
@product.images << Image.new(:image_url => image_filename)
# save file on the disk
File.open("#{RAILS_ROOT}/public/images/#{image_filename}",
&qu...
2006 Jun 27
2
Serve an image up from an action
...ion folder (I do not want
users to be able to access them directly...I want the retrieval of the
images to be controlled by an action.
I have an action in one of my controllers that looks something like
this:
def serve_user_image
@user = session[:user]
image_file = File.new(@user.image_filename, "rb")
send_data image_file, :filename => @user.image_filename, :type =>
"image/jpeg", :disposition => "inline"
end
And inside my view, something like this:
<%= image_tag url_for(:action => "serve_user_image" ) %>
However, asi...
2008 Jan 21
5
attachment_fu and story runner, any updates
I''m trying to write a story for a Rails app which involves using the
attachment_fu plugin to upload images.
After blunting my pick on this for a while, google found me this:
http://www.ruby-forum.com/topic/134743#600831
So it seems that there''s a hole in Rails integration testing and
multipart form posting. David offered to incorporate a patch to story
runner at the end of the
2007 May 02
2
Virtual machines booting PXE - PXELINUX
Hello, new to the group. We have been using PXELINUX for some time now with
great success. However, with the recent spawn of virtual machines now
supporting PXE boot, has anyone been able to mount the disk in this
enviornment? Could someone direct me to any information on how to mount and
or partition drives? I have discovered the same issue with the HP DX2200
model of PC. For example if I run
2006 Mar 08
3
attribute or instance method or what?
Hi!
Uhm are attributes just something like additional members of a class,
other than those that come from the names of columns in the table?
I''ve got images table, which has ''name'' column. I''ve added support for
creating thumbnails out of uploaded pictures and i''d like to have an
easy way of accessing them in my views.
How to do it? I.e. my image
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
2007 Jul 21
2
tincctl patches
(Second try to send this. I wonder if the first one gotten eaten by a
spam filter; I'll link to patches instead of attaching them.)
Here are the tincctl patches I've been working on. They apply to
http://www.tinc-vpn.org/svn/tinc/branches/1.1@1545. I intend to commit
them once the crypto stuff's fixed. Since they're basically done, I'm
emailing them now for review and in case