Tony Tallmadge wrote:
It does appear from what's being rendered that there could be something wrong with application.rhtml, but nothing jumps out at me. Have you looked at the page source to see what's being rendered? Your view, on the other hand ...
<%a = RosterTeam.find_by_season(1, :conditions => ['nameCodeTeam =
This find should be moved into your controller section and the result assigned to an instance variable (e.g., @a) which can be used here. I have a sneaking suspicion that your choice of 'a' as a variable name may be part of the problem too. Rails' rendering engine logic may be having trouble with '<%a', potentially mixing it with processing for '<a'. Just a guess, but changing it would be easy and might yield some different results. Also, you can use more than one condition in your find_by_ . At any rate, in your controller I'd suggest something like...
@teama= RosterTeam.find_by_season_and_nameCodeTeam(1, 'MEXT')
<%="Team code name = " + a.nameCodeTeam%><br />
If your intent here is to print out the "Team season =" and then the value of a.season, use
Teams season = <%= @teama.season.to_s %>
Anything the Rails finds in your views or layouts that's not inside <%= %> or <% %> simply gets passed through. Same comment for the other lines here.
Same pattern for team b. I'm not sure why you're doing two separate finds, rather than one find with an 'or' condition on the name, but that's a different question. Your finds should be in your controller with the results assigned to instance variables.
Key to solving your problem, I think, is a quick look at the page souce being generated. If the problem's in application.rhtml like you think, some or all of the tags that appear in that file will be screwed up. If it's in your view file, then those tags will be fine and the content inside your globalLayout div will show problems.