Hi Hillary,

Just off-hand: There may be errors in Goal.create, but it won't raise them
unless you use Goal.create! instead. (Same behavior in general, but it
raises an exception if it can't create the goal. The error it raises may
tell you what's up.)

Hope that helps,
~chris


On Thu, Aug 22, 2013 at 7:08 PM, Hillary Hueter <[email protected]>wrote:

>
> so i must be doing something wrong.
>
> I put this in my routes.rb
>
> post '/goals/building/build(.:format)', :to => "goals/build#create"
>
> and when i enter "http://localhost:3000/goals/building/build"; in the
> browser, it seems to be going through the create action
>
>
>   def create
>     @goal = Goal.create
>     redirect_to wizard_path(steps.first, :goal_id => @goal.id)
>   end
>
> because it is redirecting me to the first step of the wizard. But it
> doesn't create a blank goal and the :goal_id parameter isn't being
> overwritten so i'm getting a "Can't Find Goal with ID=building" error.
> There are no errors in the create action.
>
>
>

-- 
-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
--- 
You received this message because you are subscribed to the Google Groups "SD 
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to