Mark Preston wrote: > Matt Harrison wrote: >> Mark Preston wrote: >>>> escape nasties (if appropriate)) >>> >>> Extracted source (around line #2): >>> >>> 1: <h1>Mystuff#index</h1> >>> 2: <p><%mystuff.each do |mr|%></p> >>> 3: <h1>=mr.m1</h1> >>> 4: <% end %> >>> >>> >>> HELP :) >> >> Ok, in the controller you are assigning @me to your find. Try: >> >> <% @my.each do |mr| %> >> >> in your view instead. >> >> Also, don't forget to enclose that attribute in tags: >> >> <h1><%= mr.m1 %></h1> >> >> HTH >> >> Matt > > Thanks for the reply! > > I modified the controller to look like this: > > require 'Mystuff' > > class MystuffController < ApplicationController > > def read > > @my = Mystuff.find( :all) > > end > end > > and the view to look like this: > > <h1>Mystuff#index</h1> > <p><%me.each do |mr|%></p> > <h1><=%mr.m1%></h1> > <% end %> > > and am getting the following error: > > undefined local variable or method `me' for > #<ActionView::Base:0x381bb24> > > Extracted source (around line #2): > > 1: <h1>Mystuff#index</h1> > 2: <p><%me.each do |mr|%></p> > 3: <h1><=%mr.m1%></h1> > 4: <% end %> > > > Thanks for the continued help !!!!
ok, cleaned up some of my silly errors view looks like this now: <h1>Mystuff#index</h1> <p><%my.each do |mr|%></p> <h1><%=mr.m1%></h1> <% end %> but still getting the error: undefined local variable or method `my' for #<ActionView::Base:0x381bb24> Extracted source (around line #2): 1: <h1>Mystuff#index</h1> 2: <p><%my.each do |mr|%></p> 3: <h1><%=mr.m1%></h1> 4: <% end %> -- 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 -~----------~----~----~----~------~----~------~--~---

