Skip to content

Instantly share code, notes, and snippets.

@brentvatne
Created April 2, 2011 02:40
Show Gist options
  • Save brentvatne/899192 to your computer and use it in GitHub Desktop.
Save brentvatne/899192 to your computer and use it in GitHub Desktop.
too odd
#if I comment out the render below, then it works. if not, I get the 'undefined local variable or method `object' ' error
#see below for code that actually executes and will read the object local in error_messages helper
# for Users#new
<h1>Sign up</h1>
<%= form_for(@user) do |f| %>
<%= render :partial => "shared/error_messages", :locals => { :object => "hi"} %>
<%#= render 'fields', :f => f %>
<div class="actions">
<%= f.submit "Sign up" %>
</div>
<% end %>
# for shared/error_messages (shared/_error_messages.html.erb)
<%= object %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment