phil7085 wrote:

> How would I then need to tell rails to use the @advert object because
> that's the part that I have been having trouble with?

Formerly, it was this:

  def preview
    @advert = Advert.new(params[:advert])
    render :partial => 'advert', :locals =>{ :@advert => @advert }
  end

I prefer that style because it makes @advert, inside the partial, safe to test 
for nil. However, on our latest new project (Rails 2.2.2) either we did 
something else wrong, or the :@ stopped working, and we had to use this:

    render :partial => 'advert', :locals =>{ :advert => @advert }

Does anyone know if the :@ trick should still work?

-- 
   Phlip


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