On Jun 2, 2011, at 5:19 PM, Mark Sobkowicz wrote:

> I ended up solving my problem, but I don't understand it.   On the hobo 
> generated index page, the form tag is called with:
> 
>       <form with="&this || User.new" without-cancel>
> 
> This works fine in development, but gives an error when deployed to heroku.   
> I changed it to:
> 
>       <form with="&User.new" without-cancel>
> 
> and it worked fine.  Any ideas why the first fails?  The line is inside  <% 
> if User.count == 0 %>, so i don't understand why it says "&this || User.new" 
> anyway.   What is  "this" supposed to be when the front controller supplies 
> it? 

Haven't dug around to make sure, but I believe the 'this' part is there so that 
if the create action fails validation the form can be re-rendered. The weirder 
part is why "this || User.new" wouldn't work *exactly* the same as "User.new" 
for the standard front_controller - "this" should be nil at that point...

Can you post a complete backtrace of the error? The most likely suspect is the 
code in Hobo::Controller::Model, but that doesn't make any sense since it's not 
supposed to be mixed into a plain hobo_controller...

--Matt

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to