----------------------- snipit ---------------------------------
def list_products_within_price_range
@price_range = PriceRange.find(params[:id])
@title = @price_range.name
@product_pages, @products = paginate(:products,
:per_page => 6,
:order => 'vintner',
:conditions => ['price < ?',
@price_range.high],
:conditions => ['price > ?',
@price_range.low])
render :action => 'products'
end
--------------------- end snipit ------------------------------
:conditions => {:price => (@price_range.low..@price_range.high)}
which will construct an SQL BETWEEN statement.
-DM
--
Daniel Morrison
[i] Collective Idea
http://collectiveidea.com
349 Pine Avenue
Holland, MI 49423
616-990-0155
dan...@collectiveidea.com
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "MidWest.rb" group.
> To post to this group, send email to midw...@googlegroups.com
> To unsubscribe from this group, send email to midwestrb-...@googlegroups.com
> For more options, v