Forum: Ruby on Rails gain value from form

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ss (Guest)
on 2006-05-10 18:52
I have the following form

<%= start_form_tag :action => 'rejectQuoteSave', :id => @project %>

<p><label for="offer_reason_rejected"><span class="required">*
</span>Reason</label><br/>
<%= text_area 'offer', 'reason_rejected'  %></p>

<%= submit_tag 'Update' %>
<%= end_form_tag %>

How can I gain the value of the text field in projects_controller.rb and
then save it to another table by doing somthing like

    @project = Project.find(params[:id])

    @offer = Offer.find(@project.offer_id)

    @offer.date_rejected = Time.now

    #########get value here###########
    @offer.reason_rejected =

    @offer.save
Mathias W. (Guest)
on 2006-05-11 00:54
(Received via mailing list)
On 5/10/06, ss <removed_email_address@domain.invalid> wrote:
>
>     @offer.reason_rejected =
>
>     @offer.save
>

I'm a bit tired, so this might be wrong, but since you got no reply
yet I figured I'd suggest it anyway so you could try it at least.

params['offer']['reason_rejected']

That should hold the data for you.

Hope that helps.
Mathias.
ss (Guest)
on 2006-05-11 12:16
Mathias W. wrote:
> On 5/10/06, ss <removed_email_address@domain.invalid> wrote:
>>
>>     @offer.reason_rejected =
>>
>>     @offer.save
>>
>
> I'm a bit tired, so this might be wrong, but since you got no reply
> yet I figured I'd suggest it anyway so you could try it at least.
>
> params['offer']['reason_rejected']
>
> That should hold the data for you.
>
> Hope that helps.
> Mathias.


Yeah that worked,

Thanks
This topic is locked and can not be replied to.