Hi,
I''m using MySQL database for my web application, and my main menu has 6
links towards the left of the page which connects to MySQL to display
the information.
I''m also having another link 7th which connects a different database
DB2
it works fine, it fetches the records from the DB2 tables and displays
fine.
But now when i navigate to any of the first 6 links, i get this strange
error in the browser.
Showing app/views/my_operation/list.rhtml where line #4 raised:
compile error
./script/../config/../app/views/my_operation/list.rhtml:4: syntax error
_erbout.concat " <p>"
Extracted source (around line #4):
1: <h1 align="center"><font color="#56A5EC">List
My
Operations</font></h1>
2:
3: <% if (@current_user.usertype_id == 1 || @current_user.usertype_id ==
3) %>
4: <p><%= link_to ''<font color="#56A5EC">New
My Operation</font>'',
:action => ''new'' %></p>
5: <% end %>
6:
7: <table border=1 cellpadding=1 cellspacing=1>
(In the list.rhml as we can see there are few spaces before the <p>.
If i remove these spaces the page is loaded fine. ie.
<p><%= link_to ''<font color="#56A5EC">New My
Operation</font>'', :action
=> ''new'' %></p>
(As we can see i have removed the spaces in the start of that line)
This happens to all the lines which is NOT beginning in the start of
that line.
Also note that the above problem I''m seeing only if i first go to the
7th link and then from there navigate to the 1st link. (I''m not sure
if the use of multiple databases is causing this problem)
After starting the Web Rick (without going to 7th link) if i navigate in
between the first 6 links, I''m NOT getting the above error (Even if
Space is there or NOT), ie the same page loads even if space is there in
the start of the lines!!!
The development log displays the below message
*************************************************************************
ActionView::TemplateError (compile error
./script/../config/../app/views/my_operation/list.rhtml:4: syntax error
_erbout.concat " <p>"
^) on line #4 of
app/views/my_operation/list.rhtml:
1: <h1 align="center"><font color="#56A5EC">List
My
Operations</font></h1>
2:
3: <% if (@current_user.usertype_id == 1 || @current_user.usertype_id ==
3) %>
4: <p><%= link_to ''<font color="#56A5EC">New
My Operation</font>'',
:action => ''new'' %></p>
5: <% end %>
6:
7: <table border=1 cellpadding=1 cellspacing=1>
*************************************************************************
Any idea why its happening, or any workaround or do i need to escape
characters to escape something ?
NOTE:- I want to do some indentation to the .rhtml files so i want to
leave some spaces.
Please let me know.
Thanks and Regards,
Dinesh
--
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
-~----------~----~----~----~------~----~------~--~---