Plugins - DatebocksEngine
Add to favoritesDatebocksEngine is a very simple Rails engine which provides a helper method to instantly deploy the Datebocks into your application.
The DatebocksEngine also includes JSCalendar as a subset of functionality. It is in the long term goal to enable this plugin to be able to be used as a whole, or by accessing each part. Whether that is the JSCalendar with a default text input box, advanced Datebocks input without JSCalendar, or with both combined which is currently the default.
This software package is developed using the Engines plugin. To find out more about how to use engines in general, go to http://rails-engines.rubyforge.org for general documentation about the Engines mechanism.
Dependancies
This plugin currently only works with the latest version of the Engines plugin located at:
http://svn.rails-engines.org/plugins/engines/
Installation
- Create your Rails application, set up your databases, grab the Engines plugin and the DatebocksEngine, and install them.
- Install the DatebocksEngine into your vendor/plugins directory
- Modify your Engines.start call in config/environment.rb
Engines.start :datebocks # or :datebocks_engine
- Edit your application.rb file so it looks something like the following:
class ApplicationController < ActionController::Base include DatebocksEngine end
- Edit your application_helper.rb file:
module ApplicationHelper include DatebocksEngine end
- The DatebocksEngine provides a core stylesheets and in addition to several javascript files, so you’ll need to include these two lines within your application’s layout. Add the following lines:
<%= engine_stylesheet "datebocks_engine", "calendar-blue" %> <%= engine_javascript "datebocks_engine", "calendar", "lang/calendar-en", "calendar-setup" %>
Configuration
Configuration Options
Usage
Once it has been installed, to use the datebocks within your application paste this line into any of your views:
<%= datebocks ('model', 'date_column') %>
To adjust the default value, set the "@dateField" variable, before using the datebocks helper method.
<% @model.date_column = '2006-10-11 %>
Bugs
Please report any bugs or feature enhancements to http://dev.toolbocks.com

it should be datebocks_field and not datebocks for the call