# Re: Problem with saving records through the form

**URL:** <https://www.ruby-forum.com/t/re-problem-with-saving-records-through-the-form/134622>\
**Category:** Ruby\
**Created:** [April 13, 2008, 2:56am UTC](https://www.ruby-forum.com/t/re-problem-with-saving-records-through-the-form/134622 "2008-04-13T02:56:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajatgarg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a183cd/32.png) [@rajatgarg](https://www.ruby-forum.com/u/rajatgarg)\
**Post date:** [April 13, 2008, 2:56am UTC](https://www.ruby-forum.com/t/re-problem-with-saving-records-through-the-form/134622/1 "2008-04-13T02:56:32Z")

</div>

I have a form on a page _add\_flight.rhtml -_  
\<%=form\_tag({:controller=\>“local\_flights”,:action=\>“shared”},  
{:id=\>“add\_flight”, :method=\>“post”})%\>  
…  
\<%=submit\_tag(“Add your Flight Request”)%\>

Then,\* in controller - \*  
def shared  
\_flt = params[:fltAvailable]  
if !\_flt.blank?  
@flt = SharedLocalFlight.new(\_flt)  
@flt.save  
end  
@fltSharedList = SharedLocalFlight.find(:all)  
end

> > This seems to be getting called and then shared.rhtml gets rendered

However, record doesn’t get saved to table. There is no error msg in  
development.log.

In Shared controller, I rendered params.yaml to see where the issue is -

— !map:HashWithIndifferentAccess  
commit: List your Flight  
action: shared  
fltAvailable: !map:HashWithIndifferentAccess  
from\_airport: BFI  
cost\_type: Cost per person

num\_seats: “3”  
estimated\_flying\_time: “1:00”  
estimated\_cost: “45”  
model\_name: “”  
return\_time: 9:00 AM  
description: lslkdslks  
mfr\_name: “”

from\_time: 9:00 AM  
return\_date: “2008-04-16”  
from\_date: “2008-04-11”  
to\_airport: HQM  
aircraft\_id: “73838”  
flight\_type: One Way

controller: local\_flights

I still can’t figure out the issue. I will really appreciate if you  
can help spot any discrepancy.

–  
Rajat G.

Ph: 206-499-9495  
Add: 1314 Spring Street, #412  
Seattle, WA 98104  
Web: [http://www.pilotoutlook.com](http://www.pilotoutlook.com)  
Aircraft I have flown:  
738VJ[http://www.pilotoutlook.com/aircraft/CESSNA/172N/738VJ](http://www.pilotoutlook.com/aircraft/CESSNA/172N/738VJ)
