Skip to content
Browse files

Rails 2.2 compatible

  • Loading branch information...
1 parent f317368 commit 68bdbf598b2f0271df1301869fc6940333802d66 @timcharper committed Nov 23, 2008
View
3 History.txt
@@ -1,3 +1,6 @@
+== Version 1.12 ==
+ * Updated for compatibility with Rails 2.2
+
== Version 1.11.1 ==
* properly wrap buttons if they are too big for the line
* more translations: german (Jonas), Added russian translation (DEkart)
View
7 lib/calendar_date_select.rb
@@ -6,6 +6,12 @@
ActionView::Base.send(:include, CalendarDateSelect::FormHelper)
ActionView::Base.send(:include, CalendarDateSelect::IncludesHelper)
+ if ([Rails::VERSION::MAJOR, Rails::VERSION::MINOR] <=> [2, 2]) == -1
+ puts "This version of calendar date select (#{CalendarDateSelect.version}) requires Rails 2.2"
+ puts "To use an earlier version of rails, use calendar_date_select version 1.11.x"
+ exit
+ end
+
# install files
unless File.exists?(RAILS_ROOT + '/public/javascripts/calendar_date_select/calendar_date_select.js')
['/public', '/public/javascripts/calendar_date_select', '/public/stylesheets/calendar_date_select', '/public/images/calendar_date_select', '/public/javascripts/calendar_date_select/locale'].each do |dir|
@@ -15,5 +21,4 @@
FileUtils.cp(Dir.glob(source+'/*.*'), dest)
end
end
-
end
View
4 lib/calendar_date_select/calendar_date_select.rb
@@ -1,5 +1,5 @@
class CalendarDateSelect
- VERSION = '1.11.1'
+ VERSION = '1.12'
FORMATS = {
:natural => {
:date => "%B %d, %Y",
@@ -176,7 +176,7 @@ def calendar_date_select(object, method, options={})
nil
end
- tag = ActionView::Helpers::InstanceTag.new(object, method, self, nil, options.delete(:object))
+ tag = ActionView::Helpers::InstanceTag.new(object, method, self, options.delete(:object))
calendar_date_select_output(
tag.to_input_field_tag( (calendar_options[:hidden] || calendar_options[:embedded]) ? "hidden" : "text", options),
calendar_options
View
2 public/javascripts/calendar_date_select/calendar_date_select.js
@@ -1,4 +1,4 @@
-// CalendarDateSelect version 1.11.1 - a prototype based date picker
+// CalendarDateSelect version 1.12 - a prototype based date picker
// Questions, comments, bugs? - see the project page: http://code.google.com/p/calendardateselect
if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required. If using earlier version of prototype, please use calendar_date_select version 1.8.3");

0 comments on commit 68bdbf5

Please sign in to comment.
Something went wrong with that request. Please try again.