2011-06-01T13:24:09+00:00 app[web.1]: Started GET "/" for 108.20.187.128 at Wed Jun 01 06:24:09 -0700 2011
2011-06-01T13:24:09+00:00 app[web.1]: Processing by FrontController#index as HTML
2011-06-01T13:24:09+00:00 app[web.1]: Rendered front/index.dryml (116.7ms)
2011-06-01T13:24:09+00:00 app[web.1]: Completed in 136ms
2011-06-01T13:24:09+00:00 app[web.1]:
2011-06-01T13:24:09+00:00 app[web.1]: ActionView::Template::Error (undefined method `name' for nil:NilClass):
2011-06-01T13:24:09+00:00 app[web.1]: 62:
2011-06-01T13:24:09+00:00 app[web.1]: 63: <% if User.count == 0 -%>
2011-06-01T13:24:09+00:00 app[web.1]: 64: <h3 style="margin-top: 20px;">There are no user accounts - please provide the details of the site administrator</h3>
2011-06-01T13:24:09+00:00 app[web.1]: 65: <form with="&this || User.new" without-cancel>
2011-06-01T13:24:09+00:00 app[web.1]: 66: <field-list: fields="first_name, last_name, email_address, password, password_confirmation"/>
2011-06-01T13:24:09+00:00 app[web.1]: 67: <submit: label="Register Administrator"/>
2011-06-01T13:24:09+00:00 app[web.1]: 68: </form>
2011-06-01T13:24:09+00:00 app[web.1]: app/views/taglibs/auto/rapid/forms.dryml:18:in `form__for_user'
I have an app in production on heroku using pre25, so this is a newer problem than that (or I'm just making a mistake that I didn't make then).
Thanks for looking!
Mark
Is it possible to take a look at: app/views/taglibs/auto/rapid/forms.dryml ?
TF
On Jun 1, 2011, at 2:27 PM, Mark Sobkowicz wrote:
> app/views/taglibs/auto/rapid/forms.dryml:18:in `form__for_user'
<def tag="form" for="User">
<form merge param="default">
<error-messages param/>
<field-list fields="last_name, first_name, message, email_address, administrator, state" param/>
<div param="actions">
<submit label="#{ht 'user.actions.save', :default=>['Save']}" param/><or-cancel param="cancel"/>
</div>
</form>
</def>
> --
> You received this message because you are subscribed to the Google Groups "Hobo Users" group.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to hobousers+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
>
<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?
Mark
On Jun 1, 2011, at 10:03 AM, Tiago Franco 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 view this discussion on the web visit https://groups.google.com/d/msg/hobousers/-/nyUKjvoQgjIJ.
For the simple experiments I've done on Heroku, I've typically kept my auto-generated taglibs as part of my GIT repository and insured they are are up to date before pushing to Heroku, otherwise Hobo will try to regenerate them (which it can't do in Heroku's read-only file system.)
--
You received this message because you are subscribed to the Google Groups "Hobo Users" group.