Veera Sundaravel wrote:
> pass the seat variable with your render call something like this,
> 
> <%= render 'form', :locals => { :seat => @seat } %>
> 
> 
> --
> Regards,
> 
> T.Veerasundaravel.
> http://tinyurl.com/25vma7h
> @veerasundaravel

Thanks @Veera.

It actually worked when I inserted :partial => explicitly like this:


<%= render :partial  => 'form_seat', :locals => {:seat => Seat.new } %>

When I tried your solution:

<%= render 'form_seat', :locals => {:seat => @seat } %>

I got the following:

undefined local variable or method `seat' for 
#<#<Class:0x515bb78>:0x515aa50>

Extracted source (around line #1):

1: <%= form_for(seat) do |f| %>
2:   <% if seat.errors.any? %>
3:     <div id="error_explanation">
4:       <h2><%= pluralize(seat.errors.count, "error") %> prohibited 
this seat from being saved:</h2>

Thanks.

-- 
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