Hello ! I'm trying to use this example but it doesn't work. I guess it's because I use a shallow nested model ! I get this error : Template is missing
Missing template pprojects/create with {:formats=>[:html], :handlers=>[:builder, :erb, :haml, :rjs, :rhtml, :rxml], :locale=>[:en, :en]}
It looks like my app is trying to do HTML and no JS because my server console says the following:
Processing by ProjectController#create as HTML
Maybe I have a problem here :
<%= form_for([@organization, @project], :remote => true) do |f| %>
or because in my controller my load method isn't compatible with create and update :
def load
@projects = Project.all
@project = Project.new
end
def create
@project = @organization.projects.new(params[:project])
if @project.save
flash[:notice] = "Successfully created project."
@projects = Project.all
end
end
def update
@project = Project.find(params[:id])
if @project.update_attributes(params[:project])
flash[:notice] = "Successfully updated project."
@projects = Project.all
end
Do you have a clue? Thanks in advance