Project

General

Profile

Actions

Patch #966

closed

DRY: Move repetitive calendar include code from views into helper

Added by Peter Suschlik over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
UI
Target version:
Start date:
2008-03-31
Due date:
% Done:

0%

Estimated time:

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').


Files

calendar_include_dry.patch (6.11 KB) calendar_include_dry.patch Move repetitive calendar include code from views into helper Peter Suschlik, 2008-03-31 18:06
Actions #1

Updated by Jean-Philippe Lang over 16 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.

Actions

Also available in: Atom PDF