Re: Problem with saving records through the form

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
Aircraft I have flown:
738VJhttp://www.pilotoutlook.com/aircraft/CESSNA/172N/738VJ

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs