similar to: Is there a problem with Agile code in Web 2.0 chapter?

Displaying 20 results from an estimated 10000 matches similar to: "Is there a problem with Agile code in Web 2.0 chapter?"

2006 May 22
1
Agile Web Dev unit test fails with fixture instance variable
I''m following Agile Edition 1. On page 148 it suggests using instance variables named after the fixture, for example: assert_equal @version_control_book.id, @product.id When I introduce this type of instance variable into my test, I get the following error: 1) Error: test_not_owner(GroupTest): RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the
2006 Apr 29
5
HABTM - how to insert join row when associated rows exist
I have successfully used HABTM to create a many-to-one-to-many set of rows in one step. Now, if two objects I want to associate already exist, how do I create the join row? The Agile book mentions the ''push_with_attributes'' method. The text says this method is useful for adding additional attributes to the join row (in the example a ''read_at'' timestamp). I
2006 May 02
6
Is there a link_to ''external url''?
I''ve checked the Rails documentation but find no mention of link_to ''external url'' or equivalent. Does rails have a built in method to do this? thanks -Lindsay -- Posted via http://www.ruby-forum.com/.
2006 May 08
3
Can you have multiple before filters?
Hi, Is it possible to specify multiple before filters in a controller... here''s the thing: only one set of filters is to use the :except option. Something like: before_filter :check_for_session_cookie before_filter :validate_user :except =>[''login''] which I use to a) check if the user has returned to the site and has a saved cookie holding login details b) check
2006 Apr 06
10
Advice needed on tracking down unusual error
Does anyone have advice on how to go about locating the cause of this error message: ActionView::TemplateError (wrong number of arguments (3 for 1)) on line #4 of app/views/products/search.rhtml: 4: <%= start_form_tag :action => ''search'' %> I don''t see anything wrong with line 4 above. Some background: I''ve made a number of changes to Controllers,
2006 Feb 22
3
Unit test failure - nil object?
I''m following instructions in the Agile book, page 146 for testing an object update to the database. Here''s my code: def test_update assert_equal "jack@smiths.com", @user.email @user.email = "jack@smiths.org" assert @user.save, @user.errors.full_messages.join("; ") @user.reload assert_equal @user.email,
2006 May 09
4
Agile Web Development with Rails
Hi, I''m new to Ruby, Rails and MySQL... Before Dropping my database, I went back to a previous Grant problem. On page 54, there are three create database commands...these all worked fine for me. I then tried the following Grant command: Grant all on depot_development.* to ''dave''@''localhost''; I got back the following error message: Error 1133 (42000):
2006 Jul 21
2
Source code missing for "Agile Web Development with Rails"
Hi, I purchased the first edition of "Agile Web Development with Rails" and it says the source code shown in the book is available on http://pragmaticprogrammer.com/titles/rails . However, I can''t find it. Does anyone know where I can get the code from? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 May 11
3
Textile/RedCloth and h() incompatible?
If a user enters the Textile-based code for an image, say: !>graphic.png! the textile() method will successfully render a right-float image. Now, if I want to escape the user''s text using h(), the ''>'' is turned into an &amp;. Obviously, the image then fails to render in a browser. Is there a work around for this? I guess what I''m really asking
2006 May 02
5
does not equal conditional
I am trying to figure out how to write a conditional statement that will execute only if a specified variable is not empty. Right now my view looks like this: <dt>Building Regulations</dt> <% for link in @cat1 %> <dd><a href="<%= link.url %>"><%= link.title %></a></dd> <% end %> Action: @cat1 = Link.find(:all, :conditions
2006 Oct 30
6
Agile Web Development with Rails
Hi, Anbody having "Agile Web Development with Rails" soft copy please send me sansflair-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Thanks and Regards, San -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2006 Feb 15
2
First unit test fails
I''ve just started working through ''Agile'' chapter 12 ''Testing''. I''ve followed the steps carefully, setting up a fixture and unit test to check the creation of an order. When I run the test I get the following: Loaded suite test/unit/order_test Started F Finished in 0.108008 seconds. 1) Failure: test_create(OrderTest)
2006 Jun 21
3
Is this a weird bug with auto_complete?
I think I may have found a bug with the auto_complete feature in rails: My controller has a before_filter with an except clause preventing the filter from running on a specific action. The action renders a view with a text_field_with_auto_complete field. Much to my suprise, the filter appears to run when I type data into this field! The filter is part of my security regime, so I end up with a
2006 May 04
1
Re: How do I identify the initiating View from within aHelper?
Lindsay, Wouldn''t you want to use a component for this? I know components seem to be out of favor, but they seem like a perfect fit for this very thing. You could then go like: <%= render_component :controller => ''sidebar'', :action => ''home_menu'' %> The :action parameter could even be more dynamic based on your own needs. Maybe someone
2006 Feb 20
4
SHow do you suppress ERB newlines globally
Is there a config flag to suppress the newline at the end of every ERB ''%>'' tag, so it would not be necessary to type ''-%> each time? -- Posted via http://www.ruby-forum.com/.
2007 Feb 06
3
Form won't accept ampersand
Hi guys, My start_form_tag generated form will not accept a text field containing an ampersand. For example, the text ''A & B'' is trunacted to ''A'' in the param hash. I know ampersands have to be encoded in URLs, but I''m surprised my form has a problem with this. I''ve tested this in Safari and Firefox. thanks Lindsay -- Posted via
2006 Mar 27
3
RMagick and thumbnails
I''ve based my code on the Agile example for uploading files, pages 362-365. I''ve successfully loaded the Picture object to the database, but I come unstuck when trying to replicate this for a thumbnail version of the original image: thumbnail = Thumbnail.new thumbnail.name = ''thumbnail_'' + @picture.name.to_s
2006 Jan 17
5
Noob Question concerning code in Agile Web Development with Rails
Hi, I''m currently learning Ruby on Rails using "Agile Web Development with Rails." I am using RadRails as my development environment. Everything has been going along well, until the end of chapter 7. Just before the end of the chapter, we set up our store pages so that they can be styled with the depot.css stylesheet. This is where I run into my problem. The stylesheet
2006 Mar 05
3
"Undefined method" problem in "Agile Web Development With Rails"
Hi, I''m reading the "Agile Web Development With Rails" book. So long, everything has worked fine, but now I got this annoying error message that I just can''t understand. The error appears for me around page 87, chapter 8. NoMethodError in Store#display_cart Showing app/views/store/display_cart.rhtml where line #28 raised: undefined method `product''
2006 Feb 21
0
Blog of building Agile Web Development w/Rails Depot App using Ackbar/KirbyBase (Chapter 6-7)
Sorry for the long Subject line, but I couldn''t figure out what else to call it. :-) Just a quick announcement to tell you that I have worked through Chapters 6 and 7 so far of "Agile Web Development with Rails", using Ackbar/KirbyBase to develop the Depot app instead of MySQL. You can find my blog about it at: http://houseonfire.wordpress.com For those who