On 16 Mar 2008, at 18:44, Steve Glaz wrote:
>
> Hi all,
>
> I have the following code in my application layout:
>
> <div id="utility">
> <% if logged_in? %>
> <%= link_to "Sign Out", logout_path %>
> <% else %>
>
> <%= link_to_function "Sign in",
>
"$(''signin'').toggle();$(''signin_link'').toggle()",
> :id => "signin_link" %>
>
> <%= form_tag login_path, {:id => "signin"}, {:style
=>"display:
> none"} %>
> Log In<%= text_field_tag ''login'' %>
> Password<%= password_field_tag ''password'' %>
> <%= submit_tag ''Sign In'' %>
>
> <% end %>
> <% end %>
> </div>
>
> and for some reason it complains about the <% end %> tag
corresponding
> to the form_tag with this message -> syntax error, unexpected kEND,
> expecting $end
>
if you forget about all the bits in the middle you''re just doing
form_tag(...)
end
Which is obviously a syntax error. On the other hand,
form_tag(...) do
end
is fine.
When using form_tag like this you need to use <% and not <%
Fred
> If I replace the second <% end %> with </form> It works fine.
>
> Any ideas what the heck is going on here?
>
> Thanks,
> steve
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---