
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
acts_as_full_calendar_event
Advanced tools
Gem to allow any model to work as event for FullCalendar
Acts As Full Calendar Event is a Ruby Gem specifically written for Rails/ActiveRecord models. The main goals of this gem are:
Just add the following to your Gemfile to install the latest release.
gem 'acts_as_full_calendar_event', '1.0.1'
And follow that up with a bundle install
.
class SomeEvent < ActiveRecord::Base
acts_as_full_calendar_event field_start: :calendar_inicio,
field_end: :calendar_fin,
field_title: :calendar_title,
field_color: "#FF0000",
field_text_color: :calendar_text_color,
field_url: :url_for_calendar,
field_link_data_toggle: :calendar_link_data_toggle,
field_link_data_target: :calendar_link_data_target,
method_fields: :for_calendario,
method_filter_category: :within_calendar_category,
method_filter_user: :by_user_id,
method_filter_date: :filter_by_date,
method_categories: :categories,
field_category_class: :category_class
end
Initialize as
ActsAsFullCalendarEvent::Calendar.new(params: params).filter
params is a hash that must contain: · start (Date) · end (Date) and can also contain: · user_id · Categories
Categories hash has the following structure:
{ "CategoryClassName1" => [id1, id2], "CategoryClassName2" => [id1, id2] }
If some category class doesn't appear as hash key it will be ignored.
filter
method returns an ActiveRecord::Relation
with all matching events
All tests follow the RSpec format and are located in the spec directory. They can be run with:
rake spec
Acts as votable is released under the MIT License.
FAQs
Unknown package
We found that acts_as_full_calendar_event demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.