Patch #966
DRY: Move repetitive calendar include code from views into helper
| Status: | Closed | Start date: | 2008-03-31 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | UI | |||
| Target version: | 0.8 |
Description
Avoid repetitive code snippets seen in many views:
<% content_for :header_tags do %>
<%= javascript_include_tag 'calendar/calendar' %>
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
<%= javascript_include_tag 'calendar/calendar-setup' %>
<%= stylesheet_link_tag 'calendar' %>
<% end %>
Move that code to ApplicationHelper in call it implicitly when calling calendar_for('field_id').
Associated revisions
Move repetitive calendar include code from views into helper (patch #966 by Peter Suschlik).
History
#1 Updated by Jean-Philippe Lang about 4 years ago
- Status changed from New to Closed
- Target version set to 0.8
This patch cleaned the views indeed.
Committed in r1315 with slight changes. Thanks.
