Hello guys, I'm new to the Ruby, and especially to Camping. I've been
having some difficulty because there aren't that many tutorials about
Camping compared to other larger frameworks.
I've been building some small stuff recently to learn about how it
work, but I've puzzles as to how user input in a textbox is processed.
Here's some code from the awfully short yet extremely informative
Camping Book:

module Nuts::Views
 def edit
  h1 @page.title
  form :action => R(PageX, @page.title), :method => :post do
    textarea @page.content, :name => :content,
      :rows => 10, :cols => 50

    br

    input :type => :submit, :value => "Submit!"
  end
 end
 end

It's apparent that since the input is encased in the textarea block,
it send the value when clicked. the :action says what class to send it
to, and :method which method. The docs say that the R() syntax is for
creating a path. Could I simply use the name of a controller instead,
if it's in the same Ruby file?

And how is it sent along? Must the post method have a certain argument?

If somebody could answer my questions it would be extremely appreciated.

-Waffles
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to