I'm programming my way through the Agile Web dev book (3rd) and
there's a part in there that's causing a bit of confusion (p. 146 to
be exact).

You're creating a button in a partial (named _cart.html.erb) using the
following code:

<%= button_to "Checkout" , :action => 'checkout' %>

However, earlier in the book, we created a button to empty the cart
by:

<%= button_to "Empty cart" , :action => :empty_cart %>

both are pointing to actions defined in the store_controller.rb.
Everything's the same except that checkout is in single quotes and
empty_cart is preceded by a colon.  Why is this?

Is it that 'checkout' is passed a variable where empty_cart is not?
Or, am I having bigger brain fart than that?

Thank you in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to