{"id":19474607,"url":"https://github.com/tomasc/simple_form_recurring_select","last_synced_at":"2025-09-10T10:37:48.469Z","repository":{"id":56895751,"uuid":"44858232","full_name":"tomasc/simple_form_recurring_select","owner":"tomasc","description":"Wrapper around the 'recurring_select' gem for SimpleForm","archived":false,"fork":false,"pushed_at":"2018-07-16T22:03:20.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-01T16:51:12.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomasc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-24T08:25:11.000Z","updated_at":"2018-07-16T22:03:21.000Z","dependencies_parsed_at":"2022-08-21T01:50:20.599Z","dependency_job_id":null,"html_url":"https://github.com/tomasc/simple_form_recurring_select","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tomasc/simple_form_recurring_select","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fsimple_form_recurring_select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fsimple_form_recurring_select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fsimple_form_recurring_select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fsimple_form_recurring_select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasc","download_url":"https://codeload.github.com/tomasc/simple_form_recurring_select/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fsimple_form_recurring_select/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274447618,"owners_count":25287114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T19:25:50.784Z","updated_at":"2025-09-10T10:37:48.415Z","avatar_url":"https://github.com/tomasc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Form Recurring Select\n\n[![Build Status](https://travis-ci.org/tomasc/simple_form_recurring_select.svg)](https://travis-ci.org/tomasc/simple_form_recurring_select) [![Gem Version](https://badge.fury.io/rb/simple_form_recurring_select.svg)](http://badge.fury.io/rb/simple_form_recurring_select) [![Coverage Status](https://img.shields.io/coveralls/tomasc/simple_form_recurring_select.svg)](https://coveralls.io/r/tomasc/recurring_select)\n\nWrapper around the [recurring_select](https://github.com/GetJobber/recurring_select) gem for Simple Form.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'simple_form_recurring_select'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install simple_form_recurring_select\n\n## Usage\n\nIn model:\n\n```ruby\nclass MyModel\n  include SimpleFormRecurringSelect::HasRecurrenceRule\n  has_recurrence_rule\n\n  def recurrence_rule\n    @recurrence_rule ||= schedule.recurrence_rules.first\n  end\n\n  private\n\n  def update_schedule\n    self.schedule = IceCube::Schedule.new(schedule.start_time) do |s|\n      s.add_recurrence_rule(@recurrence_rule) if @recurrence_rule.present?\n    end\n  end\nend\n```\n\nThis will setup `recurrence_rule` accessor that converts JSON coming from a form to [IceCube::Rule](https://github.com/seejohnrun/ice_cube). The logic of adding the recurrence rule to a schedule is left up to you.\n\nIn forms:\n\n```ruby\n= form.input :recurrence_rule, as: :recurring_select\n```\n\n## Configuration\n\nThe accessor name can be directly specified:\n\n```ruby\nclass MyModel\n  include SimpleFormRecurringSelect::HasRecurringSelect\n  has_recurring_select :my_recurrence_rule\nend\n```\n\n## See also\n\n* [MongoidIceCubeExtension](https://github.com/tomasc/mongoid_ice_cube_extension) for storing `IceCube` schedule in Mongoid documents\n* [MongoidRecurring](https://github.com/tomasc/mongoid_recurring) for recurring DateTime fields for Mongoid models.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\n1. Fork it ( https://github.com/tomasc/simple_form_recurring_select/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasc%2Fsimple_form_recurring_select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasc%2Fsimple_form_recurring_select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasc%2Fsimple_form_recurring_select/lists"}