<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Rendering a view and passing a variable</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>Hello all,<BR>
<BR>
I have a view which display html based on the value of a variable.&nbsp; Here's the code :<BR>
<BR>
&lt;% if @language == 'e' %&gt;<BR>
&nbsp; &lt;%= link_to &quot;Fran&amp;ccedil;ais&quot;, :action =&gt; :index, :id =&gt; &quot;f&quot; %&gt;<BR>
&lt;% end %&gt;<BR>
<BR>
In my test, I'm trying to set the value of the variable first, but that just doesn't seem to work :<BR>
<BR>
it &quot;should display in english when @language is equal to 'E'&quot; do<BR>
&nbsp;&nbsp;&nbsp; @language = &quot;e&quot;<BR>
&nbsp;&nbsp;&nbsp; render &quot;/search/index&quot;<BR>
&nbsp;&nbsp;&nbsp; response.should have_tag(&quot;a[href=?]&quot;, &quot;/search/index/f&quot;)<BR>
end<BR>
<BR>
I get the error message saying that no tag was found.<BR>
<BR>
Any help would be appreciated<BR>
<BR>
Thank you in advance<BR>
<BR>
Olivier Dupuis</FONT>
</P>

</BODY>
</HTML>