I am trying to pass additional parameters for an RSPC test, such as (additional parameters, two arrays, Guest_price And times_whoa):
This should make an "outing" post lambda: make ,: outgoing => FactoryGirl.attributes_for (: outgoing),: guest_value = & gt; [55,66] ,: bar_value = & gt; [66,777] End Must have to change (outing, counting). (1) end However, my examination does not completely pay attention to them, though they are not there either. / P>
Additionally, syntax:
Post: Create, Outgoing => {FactoryGirl.attributes_for (: outgoing) ,: guest_value = & gt; [55,66] ,: bar_value = & gt; [66,777]} kicks an error:
Nomthious error: Undefined method for 'each' zero: NilClass is a result of my control code:
def make @outing = outing.New (param [: outgoing]) @outing.user_id = @user.id If @outing .seave params [: guestvalue] .each do | Guest_id | @outing.add_guest (guest_id) and paramours [: barview] .each do | Bar_id | @outing.ad_bar (bar_id) and timorange.Creative (: element_id => Outgoing. Id ,: element_type = & gt; 'outgoing' ,: start_time = & gt; paraam [[days] [: start_time],: End_time = & gt; param [: day] [: end_time]) Flash [: notice] = "Outlying successfully created!" Redirect_to @outing and flash [: notice] = "Error creating outgoing!" @outing = outgoing.NewRender (new_outing_path) and end
< P> Well, you definitely need cool braces so that you want to do (pass the arrays to the factory's function). Post an error and maybe I can help more? Reagan
Comments
Post a Comment