Skip to content
This repository has been archived by the owner on Jun 21, 2018. It is now read-only.

Commit

Permalink
:format is not a valid option for calendar_date_select_javascripts
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Jan 8, 2009
1 parent 6914021 commit f87d3ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/calendar_date_select/includes_helper.rb
Expand Up @@ -7,7 +7,7 @@ def calendar_date_select_stylesheets(options = {})

# returns an array of javascripts needed for the selected locale, date_format, and calendar control itself.
def calendar_date_select_javascripts(options = {})
options.assert_valid_keys(:format, :locale)
options.assert_valid_keys(:locale)
files = ["calendar_date_select/calendar_date_select"]
files << "calendar_date_select/locale/#{options[:locale]}" if options[:locale]
files << "calendar_date_select/#{CalendarDateSelect.format[:javascript_include]}" if CalendarDateSelect.format[:javascript_include]
Expand All @@ -20,10 +20,10 @@ def calendar_date_select_includes(*args)
@cds_already_included=true

options = (Hash === args.last) ? args.pop : {}
options.assert_valid_keys(:style, :format, :locale)
options.assert_valid_keys(:style, :locale)
options[:style] ||= args.shift

javascript_include_tag(*calendar_date_select_javascripts(:locale => options[:locale], :format => options[:format])) + "\n" +
javascript_include_tag(*calendar_date_select_javascripts(:locale => options[:locale])) + "\n" +
stylesheet_link_tag(*calendar_date_select_stylesheets(:style => options[:style])) + "\n"
end
end

1 comment on commit f87d3ef

@shingara
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it’s can be usefull. But in this version, it’s not used.

I made a commit http://github.com/jtek/calendar_date_select/commit/286a9d22728ff2a13d4f7cfa9ab63e137e400734 which use this option.

Please sign in to comment.