Newbie: First time w/ ActiveScaffold; new create 500 errors

59 views
Skip to first unread message

Ross R

unread,
Apr 17, 2012, 5:17:28 PM4/17/12
to actives...@googlegroups.com
Hi,
   First time attempting to use ActiveScaffold.  The list works fine, but trying to create a new item in any of my Models generates a 500 Internal Server Error.  Here's what I get:
Completed 500 Internal Server Error in 53ms

ActionView::Template::Error (undefined method `model_name' for NilClass:Class):
    1: <%= form_for(@ticket_type) do |f| %>
    2:   <% if @ticket_type.errors.any? %>
    3:     <div id="error_explanation">
    4:       <h2><%= pluralize(@ticket_type.errors.count, "error") %> prohibited this ticket_type from being saved:</h2>
  app/views/ticket_types/_form.html.erb:1:in `_app_views_ticket_types__form_html_erb___1507740521291095460_70122715152840'

Not much there to go on, I was hoping someone with a bit more troubleshooting experience might be able to help.  

Thanks.

Sergio Cambra

unread,
Apr 18, 2012, 3:29:32 AM4/18/12
to actives...@googlegroups.com
ActiveScaffold uses their own views, unless you create some views in
app/views/model_name, but then you must follow some ActiveScaffold conventions.
If you don't want to override ActiveScaffold views, remove
app/views/ticket_types

Ross R

unread,
Apr 18, 2012, 5:55:30 PM4/18/12
to actives...@googlegroups.com
That worked!  Thanks.

Ross
Reply all
Reply to author
Forward
0 new messages