Hello! I'm everywhere searching the answer for my question. How to get
parameters to controller from view using <input tag. But I want to do
this without db. I have the code:

class TranslateController < ApplicationController
   def start
   @time = Time.now
 end

 def result
    @rez = params[:name]
   end
end

<html>
        <head>
                <title> Translate numbers from 10 to 16 system </title>
        </head>
        <h1> Type your number and press link </h1>
                <p> Time is <%= @time %> </p>
                <form action="result" name="post" method="post"/>
                        <input type="image" src="c:\Users\Vero\My 
Documents\Aptana Studio
Workspace\Lab_8\public\images\rails.png" align="top">
                        <input type="text" align="left"  value="0x">
                </form>
<p> <%= link_to "Result", :action => "result" %> </p>
</html>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
        <head>
                <title> Translate numbers from 10 to 16 system </title>
        </head>
        <body>
                <h1> It's result of your translation </h1>
                <h2> <%= @rez %></h2>
                <p> Back to <%= link_to "1 st page", :action => "start"%> </p>
        </body>
</html>

I'm new in Ruby. ( please, help with all it

--

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