Within your controller action you can do:
params[:my_param_name]
Assuming you''ve done something like PHP before, it''s the
equivalent to
PHP''s:
$_POST["my_param_name"]
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 2 March 2010 13:10, Alvaro Diaz
<aldiaz84-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello!, I''m a RoR begginer, i need it to make a web interface for
a
> bigger project that i''m developing in Ruby, but i don''t
know how to do
> the next:
>
> I want to read a config file of my main program (a normal conf file),
> and be able to change some values.
> I take all the names and values pf my config file correctly via a ruby
> function, to change the values i think in a form which has a lot of
> inputs named like the vars i want to change, and send the new value.
> My post command it''s correct for me, it contains the data i want
> (something like [name]value[name]value....) , but i don''t know how
i
> can access to the post variable to work with this data in Ruby ( i
> need to write a file [name] \n value .....)
> The code for my form its:
>
> <% form_for :variable , :legend => "Personal info", :url
=> {:action
> => :save_post} do |$dataform| %>
> ....#Read my file .....
> ....
> Name: <%=text_field_tag("#{var_name}", "#{value}",
:size => 20)%> </p>
> <%= submit_tag "Change Config File", :class =>
"submit" %>
>
> so, how can i access to the post variable?
>
> Thanks!
>
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.