All Projects → zenizh → carender

zenizh / carender

Licence: MIT license
📅 A monthly calendar for Rails application

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to carender

fcmpush
Firebase Cloud Messaging API wrapper for Ruby, suppot HTTP v1 API including access_token auto refresh feature.
Stars: ✭ 44 (+193.33%)
Mutual labels:  gem
harvesting
Ruby wrapper for the Harvest API v2
Stars: ✭ 24 (+60%)
Mutual labels:  gem
churnalizer
Analyze your Ruby app for Churn vs Complexity
Stars: ✭ 17 (+13.33%)
Mutual labels:  gem
socket.io-rails
Rails asset pipeline wrapper for socket.io
Stars: ✭ 57 (+280%)
Mutual labels:  gem
ssrf filter
A ruby gem for defending against Server Side Request Forgery (SSRF) attacks
Stars: ✭ 68 (+353.33%)
Mutual labels:  gem
active record-updated at
Touch `updated_at` by default with calls to `update_all` and `update_column(s)`
Stars: ✭ 27 (+80%)
Mutual labels:  gem
tinify-ruby
Ruby client for the Tinify API.
Stars: ✭ 41 (+173.33%)
Mutual labels:  gem
mixin bot
A simple API wrapper for Mixin Network in Ruby
Stars: ✭ 12 (-20%)
Mutual labels:  gem
hijri
Hijri date library for Ruby
Stars: ✭ 56 (+273.33%)
Mutual labels:  gem
my api client
A framework of Web API Client. Provides features error handling, retrying, pagination and so on.
Stars: ✭ 19 (+26.67%)
Mutual labels:  gem
warm-blanket
Ruby gem for warming up web services on boot
Stars: ✭ 1 (-93.33%)
Mutual labels:  gem
reproducible-continual-learning
Continual learning baselines and strategies from popular papers, using Avalanche. We include EWC, SI, GEM, AGEM, LwF, iCarl, GDumb, and other strategies.
Stars: ✭ 118 (+686.67%)
Mutual labels:  gem
exception hunter
Crash reporting engine to hunt down bugs 🐞
Stars: ✭ 78 (+420%)
Mutual labels:  gem
runfile
Command line for your projects
Stars: ✭ 22 (+46.67%)
Mutual labels:  gem
backlog kit
Client library for the Nulab's Backlog API version 2 written in Ruby.
Stars: ✭ 28 (+86.67%)
Mutual labels:  gem
nagios check
Ruby Nagios Check Integration
Stars: ✭ 13 (-13.33%)
Mutual labels:  gem
southwest-checkin
Easy-to-use gem to check in to Southwest flights automatically. Also supports sending email notifications.
Stars: ✭ 67 (+346.67%)
Mutual labels:  gem
rails-heroicon
Ruby on Rails views helpers for the awesome heroicons by Steve Schoger.
Stars: ✭ 23 (+53.33%)
Mutual labels:  gem
syobocal
Simle gem for Syboi Calendar
Stars: ✭ 13 (-13.33%)
Mutual labels:  gem
i18n lazy scope
Use lazy lookup with custom i18n scopes.
Stars: ✭ 11 (-26.67%)
Mutual labels:  gem

Carender

Gem Version Build Status

This gem renders a monthly calendar for Ruby on Rails application.

Usage

This gem automatically renders a monthly calendar as HTML table by fetching params[:year] and params[:month] at view context. Following code renders a simple monthly calendar:

<%= carender do |date| %>
  <%= date.day %>
<% end %>

The content passed as a block is rendered in each cell. For example, above code renders like following HTML table.

<table>
  <tr><th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th></tr>
  <tr><td></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr>
  <tr><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td></tr>
  ...
</table>

Collection

To render a calendar with a collection which is grouped by the specified column, you can pass :collection and :column arguments like as follows:

<%= carender collection: @posts, column: :posted_on do |date, posts| %>
  <% posts.each do |post| %>
    <%= link_to post.title, post %>
  <% end %>
<% end %>

Installation

Add this line to your application's Gemfile:

gem 'carender'

And then execute:

$ bundle

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kami-zh/carender. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].