Displaying 20 results from an estimated 3000 matches similar to: "(P)review of AWDwR and R4R"
2006 Nov 04
0
New version of the AWDwR beta book available
I''ve uploaded the B1.12 version of AWDwR.
The major changes include:
- Justin Gehtland''s new chapter on Web 2.0
- James Duncan Davisdon''s chapter on deployment (this is an
interesting one---JDD has strong opinions on how a Rails
application should be deployed, and the chapter mirrors this.
You''ll find it short and easy to follow).
- I changed the
2006 Feb 07
1
AWDWR: NameError (uninitialized constant UnknownAction) in rescue_action_in_public
I copied (and modified) this code from AWDWR:
def rescue_action_in_public(exception)
case exception
when ActiveRecord::RecordNotFound,
ActionController::UnknownAction
render :template=>''/error'', :layout=>''application'',
:status=>''404 Not Found''
else
render :template=>''/error'',
2006 Aug 14
1
AWDWR Chpt6: Webrick Get...200... then ...500...
Hi, Rails produces to diff Gets on the Webrick:
AWDWR Chpt 6 strange results:
First browser call to /Admin shows correct form; - And WEBrick reports:
"Get /admin HTTP/1.1" 200 485 - -> /admin
Subsequent browser calls to /Admin show:
NoMethodError in AdminController#index
undefined method `each'' for #<Mysql:0x37aba80>
- And WEBrick reports:
"Get /admin
2008 Mar 01
2
No route matches with {:method=>:get} Error in AWDWR Book
Hi I''m working on the AWDWR book and I''m on the admin section of the
book. I have rails 2 installed on my machine and I have ran into an
error when I created my controller login but when I go to
http://localhost:3000/login/index I get this error:
No route matches "/login/index" with {:method=>:get}
I haven''t touched the routes.rb file and when I generated
2006 Jul 10
2
Problem with migrations, postgresql, AWDwR
Hi all,
Rails 1.1.4
Rake 0.7.1
PostgreSQL 8.1.4
Windows XP Pro
I checked for errata on pragmaticprogrammer.com, but didn''t see any
explicit mention of this issue.
I''m going over the depot example in AWDwR, 2nd ed, and I can''t get the
migration to work on p. 82. Specifically, the AddTestData example (with
reduced description text to save my fingers some typing):
2007 Aug 21
4
[AWDwR] Confused about has_one and has_many
Heya everyone!
I am quite new to Rails and I am reading AWDwR. I am at Task E "Check
Out!". I understand it quite well, but I have a problem with the last
playground exercise: Add a Table which contains the payment types.
All goes well, but I am not sure whether I should use has_many or
has_one(as in the Playground wiki at
http://wiki.pragprog.com/cgi-bin/wiki.cgi/PT-E-3).
I use the
2006 Mar 15
4
New RadRails tutorial using AWDWR book
Hello there,
I am basically a J2EE refugee fascinated with Rails.
I have been using the Spring framework (a lightweight J2EE java framework
with some special characteristics) but I am so impressed with RoR that I am
porting over many applications.
In order to "dive into Rails", of course the second thing to do was get
myself an IDE, and since I''ve been using Eclipse for the
2006 Sep 14
4
AWDWR 2nd edition and REST
Question, and I''ll preface it by asking if this is the right list to
be posting questions regarding anything past Rails 1.1.6 , (i.e.
edgerails) ?
In the latest revision of AWDWR there is a sample REST based app.
During the creation of the controller and actions, there is a foot
note that says:
"7. By the time you''re reading this, there may well be support build
into Rails
2006 Jul 21
20
New version of AWDwR
Folks:
I''ve uplaoded the B1.05 version of AWDwR. It fixes a number of
reported errata (and a few that weren''t reported :), and
adds two significant changes:
1. It now uses the new Active Record decimal -> BigDecimal
conversion. I''ve personally been waiting for this for a long
time, and I''m really happy it''s now part of core. However,
2006 Jul 22
4
Reading floating points into a field stored as Integers
Hi, I''m trying to follow the "AWDR" example of storing certain types of
numbers (in my case, percentages not money) as integers in the
database. I understand from the Depot application how to format the
output to have 2 places (or n places for that matter) decimal.
Now, I"m wondering about the input. It''s more natural for people to
enter numbers as
2006 Mar 07
17
Handling Erros from AWDWR
I''m getting to the point now where I really need to start trapping the
errors.
So from my AWDWR book, I added the following directly from the book into
application.rb...
def rescue_action_in_public(exception)
case exception
when ActiveRecord::RecordNotFound, ActionController::UnknownAction
render(:file => "#{RAILS_ROOT}/public/404.html",
2006 Aug 02
2
Help please: AWDWR -- Migration failure
I''m having a problem with one of the migration files from the depot application.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== AddPrice: migrating ========================================================
-- add_column(:products, :price, :decimal, {:scale=>2, :default=>0, :precision=>
8})
rake aborted!
You
2006 Jun 14
0
[AWDwR] Make flash[:notice] go away
Following the tutorial app in Agile Rails, I''m trying to figure out the
best way to get the flash notice to go away after an "Invalid product"
is selected (eg. when a new, valid product is selected). This is after
Task D, Chapter 9, in the 2nd Ed Beta.
I''ve come close to getting to work right, but I think I may still be
missing something in the control flow of
2008 Feb 06
1
Try-Catch AWDWR P3.0, Sect9.2,Mid pg 121.
On page 118, file store_controller.rb, the "redirect_to_index" is added.
At mid page 120, that line is removed. When the browser is first sent to
the ":3000/store", the page displays properly. But when the Add to Cart
button is clicked, the browser displays the text of a try-catch block
(see below). There is no error message - the browser clearly sees text
to be displayed. If I
2006 Nov 12
0
AWDWR : Validation Question
Fig 6.4 on page 73 shows only "Price is not a number" for validation
when wibble is entered for price but I get the following message:
* Price is not a number
* Price should be at least 0.01
Is this an error in the book? TIA.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Oct 14
1
[ADV] Making space: First Edition AWDwR Paper Books: $12.50
When we announced the second edition of Agile Web Development with
Rails back in May, we pretty much killed the sales of the first
edition paper book. So now, with the second edition just a few months
away, we need to clear out some space.
So, if you''d like to pick up a first edition paper book, they''re
going (while stocks last) for $12.50 (plus shipping) from
2006 Aug 07
4
AWDwR typography question
So, I''ve been listing to stuff folks have been saying about the
Bookman font we use. Most people like the font, but some feel there
aren''t enough words/line, so your eyes move too much.
So, I spent the weekend playing with typography, and I''ve come up
with a compromise. The thing is: it looks good to me, but I don''t
want to mess up the read for others
2006 Jun 19
12
AWDWR- Question
I''m having a particularly difficult time undersanding one lesson from
this book. This is in relation ot how one would grab "search"
parameters from web forms to search for records in the database. I
understand the :conditions part of find() but am confused on the code:
1- name = params[:name]
pos = Order.find(:all,
:conditions => ["name = ? and pay_type =
2006 May 15
3
Page hit counter?
Hello all,
Yet another "don''t reinvent the wheel" n00b question:
Is there an ''official'' page hit counter plugin/code snippet/whatever? I
would need something like this:
- It is possibility to set a constant timespan (say 5 hours).
- On every page hit, save away @request.remote_ip and Time.new
- The counter gets incremented only if the same IP was here
2006 Aug 01
0
Validation of facade columns
I''m having difficulty understanding how to make validation of facade
columns consistent with validation of other active record columns. To
illustrate this, I''m going to extend the facade column example
discussed on pp. 284-5 of AWDR. Let''s say that there is a "rectangles"
table that has width and height columns. For some unknown reason,
width is stored in