# How to get parameters to controller from view using \<input tag?

**URL:** <https://www.ruby-forum.com/t/how-to-get-parameters-to-controller-from-view-using-input-tag/180759>\
**Category:** Rails\
**Created:** [December 28, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/how-to-get-parameters-to-controller-from-view-using-input-tag/180759 "2009-12-28T17:10:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![veronika](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/839c29/32.png) [@veronika](https://www.ruby-forum.com/u/veronika)\
**Post date:** [December 28, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/how-to-get-parameters-to-controller-from-view-using-input-tag/180759/1 "2009-12-28T17:10:59Z")

</div>

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

 Translate numbers from 10 to 16 system 
# Type your number and press link

Time is \<%= @time %\>

\<%= link\_to "Result", :action =\> "result" %\>

 Translate numbers from 10 to 16 system 
# It's result of your translation

## \<%= @rez %\>

Back to \<%= link\_to "1 st page", :action =\> "start"%\>

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 removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![veronika](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/839c29/32.png) [@veronika](https://www.ruby-forum.com/u/veronika)\
**Post date:** [December 28, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/how-to-get-parameters-to-controller-from-view-using-input-tag/180759/2 "2009-12-28T17:42:23Z")

</div>

On Dec 28, 2:49 pm, veronika [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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:

Use the form helpers (text\_field\_tag etc. The rails guide on forms has  
examples: [http://guides.rubyonrails.org/form\_helpers.html](http://guides.rubyonrails.org/form_helpers.html) )

Fred

> ```
> </form>
> <h2> <%= @rez %></h2>
> <p> Back to <%= link_to "1 st page", :action => "start"%> </p>
> </body>
> 
> ```
> 
> 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 removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![veronika](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/839c29/32.png) [@veronika](https://www.ruby-forum.com/u/veronika)\
**Post date:** [December 29, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/how-to-get-parameters-to-controller-from-view-using-input-tag/180759/3 "2009-12-29T13:39:39Z")

</div>

Thanks!!!  
I found interesting site:  
[http://www.codeweblog.com/ruby-on-rails-and-to-use-action-web-service-to-create-web-services/](http://www.codeweblog.com/ruby-on-rails-and-to-use-action-web-service-to-create-web-services/)  
I try to do my work the same path, but get error:  
“wrong number of arguments (1 for 0)”.  
I would like to know: can I do the same without Web-client (example)?

–

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 removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
