def edit(id)
only_provides :html
@<%= singular_model %> = <%= model_class_name %>.get(id)
raise NotFound unless @<%= singular_model %>
display @<%= singular_model %>
end
def create(<%= singular_model %>)
@<%= singular_model %> = <%= model_class_name %>.new(<%= singular_model %>)
if @<%= singular_model %>.save
redirect resource(@<%= singular_model %>), :message => {:notice => "<%= model_class_name %> was successfully created"}
else
message[:error] = "<%= model_class_name %> failed to be created"
render :new
end
end