Non-view functionality in a partial of layout.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Tarkisto |
New
|
Undecided
|
Unassigned |
Bug Description
From revision 25 there is a wrong type of functionality in line 4 of /app/views/
The main problem is "@controller.
More rails-way to do this is to use partials or different layouts. In this case a single partial can be more DRY-friendly:
#left= render :partial => "leftside"
How ever that has a problem, which makes the site crash, if there isn't leftside view-partial for requested controller. For our luck there is a rescue :)
#left= render :partial => "leftside" rescue nil
We rescue nil, because there isn't any content then.
app/views/
This type of coding opens us lots of possibilities, like different kind of tabs in every page.