Displaying 8 results from an estimated 8 matches for "product_images".
2006 Jul 28
2
has_many :through with :order column on the join model
I have a model like so
class Product < ActiveRecord::Base
has_many :image_links, :order => :position
has_many :product_images,
:order => ''image_links.position'',
:through => :image_links
end
The problem is that :order clause just gets ignored. How do you server
records in a specific order when the order column is on the join model?
@product.product_images produces this SQL:...
2006 Aug 14
1
Relationship not saving
Hi All,
I have a one to many relationship between images and gifts (one image
can be assigned to multiple gifts):
class ProductImage < ActiveRecord::Base
has_many :gifts
...
class Gift < ActiveRecord::Base
belongs_to :product_image
...
I''m trying to associate an image with a gift, and for the life of me
ActiveRecord will not associate them. Here is some test code and the
2006 Jun 28
1
sortable lists, database update
...9;,
:tag => ''img'',
:overlap => ''horizontal'',
:constraint => false,
:update => ''image-info'',
:complete => visual_effect(:highlight, ''images''),
:url => { :controller => ''product_images'', :action => "updateorder" } %>
This produces the following HTML:
<div id="images" style="border: solid black 1px; width: 672px;">
<img src="/images/store/t-shirt01.jpg" id="image_12" />
<img src="/images/store...
2007 Feb 10
0
email attachment is not sending properly
...quot;
@sent_on = Time.now
#content_type "text/html"
@body = {}
part :content_type => ''text/html'',
:body => msg
attachment :content_type => "image/jpeg",
:filename =>
''#{RAILS_ROOT}/public/images/product_images/14imagesh1.jpeg'',
:body =>
File.read("#{RAILS_ROOT}/public/images/product_images/14imagesh1.jpeg")
end
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed t...
2006 Apr 26
3
My GD2 is not working
I installed GD2 1.0/1.1, but they are both not working, does anyone
knows why? Great Thanks!
With GD 1.0 I got:
========================================================
RuntimeError
unknown symbol "gdImageSquareToCircle"
RAILS_ROOT:
/home/virtual/site1/fst/var/www/html/imodesite/public/../config/..
Application Trace | Framework Trace | Full Trace
2006 May 07
2
How to handle MySQL data types SET and ENUM in the application
Hi,
I wonder how I should use the SET and ENUM data types in my MySQL
database combined with a rails application.
This is my current _form.rhtml file for products:
-------------------------------------------------------------
<%= error_messages_for ''product'' %>
|
<!--[form:product]-->
<p><label for="product_name">Name</label><br/>
2008 May 09
0
Attachment_Fu : how to remove thumbnails only and regenerate
...f products and their images
with thumbnails :thumbnails => { :thumb => ''100x100>'' }
now we have decided to have thumbnails of size 50x50> only.
how do i destroy the existing thumbnails for images
and regenerate the new thumbnails
i shud be doing something like this
product_images.find(:all)
for each prod image
destroy the thumnnail. ---what method
create new thumbnail from existing images for products ---what method
end
pls help
jags
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are...
2006 Feb 15
9
Liquid - form helpers? multiple liquid templates?
Hi,
Its taking me a long time to get my head around the Liquid plugin. I
have a couple of questions which hopefully someone can help me with...
- How difficult would it be to add some kind of Filter or Tag which
would allow other Liquid templates to be included into the current
Liquid template (eg. similar to render(:file => "filename")
- How difficult would it be to add