Hello all,
Im having a slight problem with my website. I have a division that
is updated using a link_to_remote call. Now, inside the view I can put
plain text and everything is fine. However, if I try to pass a variable
from the controller to the view it does not work. For example I can
have this as the controller:
def show_news
@testvariable = "shizzlenitboo"
end
And inside the view I can put
<%= @shizzlenitboo %>
Yet nothing will display. Does anyone know what is causing this?
--
Posted via http://www.ruby-forum.com/.
Is this a typo? <%= @shizzlenitboo %> shouldn''t it be <%= @testvariable %> On Fri, 2006-06-09 at 20:09 +0200, Dorian wrote:> Hello all, > > Im having a slight problem with my website. I have a division that > is updated using a link_to_remote call. Now, inside the view I can put > plain text and everything is fine. However, if I try to pass a variable > from the controller to the view it does not work. For example I can > have this as the controller: > > def show_news > @testvariable = "shizzlenitboo" > end > > And inside the view I can put > <%= @shizzlenitboo %> > > Yet nothing will display. Does anyone know what is causing this? >Charlie Bowman Programmer Castle Branch Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060609/e3dd88b8/attachment.html
right,
my fault I meant to say inside the view I could have
<%= @testvariable %>
and it will not display the contents of this variable in the division.
Its just blank.
Charlie Bowman wrote:> Is this a typo?
> <%= @shizzlenitboo %> shouldn''t it be <%= @testvariable
%>
>
>
> On Fri, 2006-06-09 at 20:09 +0200, Dorian wrote:
>
>> end
>>
>> And inside the view I can put
>> <%= @shizzlenitboo %>
>>
>> Yet nothing will display. Does anyone know what is causing this?
>>
>
> Charlie Bowman
> Programmer
> Castle Branch Inc.
--
Posted via http://www.ruby-forum.com/.