ignore the previous error...

basically its not looking as my schools controller even though i 
specficy it.

here's the view..


<h1 id="school_name"><%=h @school.name %> (<%=h @school.place %>)</h1>

<h1 id="school_url"><%= link_to @school_url, @school.url %></h1>

<% form_for [...@school, @review] do |f| %>



  <p>
  <%= f.label :first_name, "First Name" %><br />
  <%= f.text_field :first_name, :length => 40 %>
  </p>

  <p>
  <%= f.label :body, "Leave a review..." %><br />
  <%= f.text_area :body, :cols => 40, :rows => 6 %>
  </p>




  <p><%= f.submit "Add Review" %></p>

<% end %>

<% unless @school.reviews == [] %>

  <div id="reviews">
    <%= render :partial => @school.reviews %>
  </div>

<% end %>




ad here's the cont.


class ReviewsController < ApplicationController

  def create

    @school = School.find(params[:school_id])
    @review = @school.reviews.build(params[:review])

    if @review.save
      redirect_to @school
    else
      render :controller => "schools", :action => "show"
    end

  end

end



---------


result is this when validation fails...

Template is missing

Missing template reviews/show.erb in view path 
/Users/rupe/Sites/schools/app/views:

which is weird because I said...      render :controller => "schools", 
:action => "show"



-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to