Displaying 20 results from an estimated 1100 matches similar to: "Rails urls & the AWD book"
2006 Jun 24
1
@version_control_book not available while testing - AWD book 1 page 148
In the page 148 of the AWD book it''s mentioned that the while testing
@products and @version_control_book are automatically made available.
That''s not the case with me. In my test environment I don''t get those two
variables.
I was wondering if anything has changed in Rails 1.1 because in the new
edition of the book (AWD - edition 2) there is no mention of such
2007 Apr 10
1
AWD page 624-626 Understanding how Apache, Mongrel and Rais work together?
I''m trying to understand the ''Big Picture'' of how Ruby on Rails
applications are deployed and operate in distributed environment (one
deployment server, many remote servers).
I follow AWD by Dave Thomas'' explanation from pages 624-626. From
reading these pages I have these questions;
1. How does the RonR instance on the ''remote'' server gain
2006 Jan 27
2
Grouping results
I have a general question about using a Ferret/Lucene index for
grouping results. I am not sure how much of the heavy lifting the
index can do for me, so I would appreciate any input. I am using
ferret to index some objects that have the following properties:
url, image_url, price, tags (space separated tags), created_at
I would like search the index for any documents that match a specific
2005 Aug 25
2
question sur R
bonjour
je suis elève à l'ENSAI Rennes et je suis actuellement en stage de fin
d'études
j'ai une question sur R
en fait lorsque le simule 2 lois normales qui sont mes 2 variables
explicatives continus
- une avec que des valeurs > 0 (ou que <0) X1
- l'autre peut prendre aussi bien des valeurs <0 ou >0 X2
et que je regresse le rating (facteur
2006 Jan 19
4
validates_presence_of
I am just going through the book and I come across a problem with the
code in the app/models:
validates_format_of :image_url,
:with => %r{^http:.+\.(gif|jpg|png)$}i,
:message => "must be a URL for a GIF, JPG, or PNG image"
It seems to moan when it''s empty even though I removed :image_url from
validates_presence_of. How should I make it optional?
2005 Dec 23
5
Can''t get data from products into @order
I went throught the "agile web developemnt with rails" and Now I''m
trying to ''enhance'' the code with some extra options. When I go to
admin/shipping I want to include some data from the products table in
with the order info listed. I can''t seem to get this to work. in my
partial form I''m trying to add this:
<td
2006 Jan 17
5
file_column mangling URL
Hey,
I''ve gotten file_column to upload a file, drop it in the dynamic
directory, but I can''t display the image, the directories repeat
themselves:
My model:
class Person < ActiveRecord::Base
file_column :image_url
In my view:
<%= image_tag url_for_file_column(''person'', ''image_url'') %>
HTML generated is this:
<img
2006 Aug 07
4
Unit testing diffculty
ok, let me show you my "products" fixtures file:
ram:
id: 1
title: RAM
description: ECC RAM Registered, 512MB
image_url: images/test.jpg
price: 29.95
date_available: 2005-01-25 00:00:00
busted_arsehole:
id: 2
title: Busted Arsehole
description: I have an arsehole, it is-e busted
image_url: images/test.jpg
price: 999.95
2006 Apr 17
9
ruby on rails book, fundamental question
Hi guys,
bought the ROR book. I understand most of it and really like it. There
is just on thing I just dont get.
Lets take this code for example.
def list
@products = paginate :product, :per_page => 10
end
As far as I understand @products should be some kinda hash or array,
with the data of the Database inside.
How can I display this array ?
One solution is to do it like this (like in
2006 Aug 09
8
AJAX image manipulation
I have this code in a controller that returns images to my browser...with
ROR.
def index
@products = Product.find_all_ pictures
end
....this is the .rhtml..
<% for photo in @pic -%>
<div class="entry">
<img src="<%= photo.image_url %>"/>
<h3><%= h(photo.title) %></h3>
<%= photo.description %>
2006 Mar 03
5
avoiding nil object error?
I''m a total Rails newbie and i''ve been struggling for hours today
with one (prolly very silly) problem:
I have a table portfolios that has many images:
class Portfolio < ActiveRecord::Base
has_many :images
end
class Image < ActiveRecord::Base
belongs_to :portfolios
end
In the controller i define a list of active portfolios:
@active_portfolios =
2010 Dec 06
10
testing chapter: agile web dev withrails
I am working my way through Agile web development with rails and I''m in
the testing chapter.
when I run the following test(or any other test)
I''m new and not sure where to start looking.
require ''test_helper''
class ProductTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
I
2006 Apr 27
3
LoginEngine File_column interop
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Hello all,
I hope someone can help me with this issue, I have the SVN
file_column and using LoginEngine/UserEngine with Rails 1.1.2. My
issue is that I''m overloading the view for LoginEngine to support a
file image upload as part of the user record and having a heck of a
time doing so.
Near the bottom of my new _edit.rhtml
2008 Aug 07
1
Proteus and wine
3 months ago I installed proteus (http://appdb.winehq.org/objectManager.php?sClass=version&iId=9846) under wine (proteus is a PCB design program). Everything was working fine until yesterday. I don't remember what wrong have I done, but I have a problem with the component choosing list. It is a regular list-box, but when I click on an item, the one that is at the very botom gets selected,
2006 Jan 10
3
multiple items on 1 column
Hello,
I am trying to put multiple items in one column and can''t seem to get
the syntax right.
These are images and the image url''s are being pulled from a database.
It seems that <tr></tr> is the trigger to go onto the next item.
Here is the code from the controller:
def list
@items = Item.find_all
end
Here is the code from list.rhtml file:
<%
2004 Sep 03
2
arima et graphique
bonjour, je rencontre quelques soucis au niveau de l'utilisation des
fonctions arima.forecast/predict; en effet elles sont dites inconnues alors
que j'ai bien install?? et charg?? le package "ts". Aussi, j'aimerai savoir
comment visualiser le graphique des pr??visions avec arima et celui des
donn??es brutes dans la m??me fen??tre.
Tout en vous souhaitant bonne r??ception
2006 Mar 04
2
unittest, not loading yml data
Here is my products.yml
version_control_book:
id: 1
title: Pragmatic Version Control
description: How to use version control
image_url: /images/sk_svn_small.jpg
price: 29.95
date_available: 2005-01-26 00:00:00
automation_book:
id: 2
title: Pragmatic Project Automation
description: How to automate your project
2004 Jul 22
2
Programmation pour MLE
Bonjour,
Je veux cherché l’estimateur de vraisemblance maximal (MLE)d’une fonction à 3 paramètre inconue étant donné une échantillon de taille 50 (les observations des valeurs de x) alors comment je peux procédé
La fonction de densité est définie par :
f(x)= 1/3(g(a1)+g(a2)+g(a3))
avec g(ai)=(exp(ai)*ai^x)/x! pour i=1,2,3.
Je vous remercie beaucoup.
A. Elhabti
2008 Mar 15
9
Spaces in Ruby on Rails and how to avoid them!
Hi,
I just started learning ruby on rails and I am having hard time with
white spacing!
Here is the piece of code that will not work:
validates_format_of
:image_url,
:with => %r{\.(gif|jpg|png)$}i,
:message => "must be a URL for a GIF, JPG or PNG image"
and here is the piece of code that will work:
validates_format_of :image_url,
:with => %r{\.(gif|jpg|png)$}i,
:message
2005 Dec 31
2
Test Unit Problem
Hello All,
I am experiencing the following test unit error working with Rails that
I can''t fathom.
I have a products.yml file which holds the following test fixture for
the products table:
dell_pc:
id: 1
title: Dell PC
description: Dell PC
image_url: http://.../pc_image.jpg
price: 15000.00
date_available: 2005-12-31 06:53:00
I also have the following product_test.rb file to