Displaying 2 results from an estimated 2 matches for "day_departure".
2012 Nov 12
7
RSpec: controller POST create
...assigns(:plan).should be_persisted
end
is the default POST create test. It raises a failure, if I changed the
validations of Plan
class Plan < ActiveRecord::Base
validates :give_take, :presence => true
validates :flight_name_id, :presence => true
validates :day_departure, :presence => true
validates :weight, :presence => true
end
The failure message is
1) PlansController POST create with valid params assigns a newly
created plan as @plan
Failure/Error: assigns(:plan).should be_persisted
expected persisted? to return true, got false...
2012 Sep 22
1
formtastic does not save at all
...</div>
<div id="airlineCompany">
<%= render :partial => ''airline'' %>
</div>
<div id="flight_name">
<%= render :partial => ''flight_name'' %>
</div>
<%= f.input :day_departure, :as => :date_select, :hint => ''Select a
date'',
:start_year => Time.now.year,
:label => "Departure date" %>
<%= f.input :weight %>
<%= f.input :check_in %>
<% end %>
<%= f.actions do %>
<%= f.action :s...