Skip to content

Commit

Permalink
Merge pull request #23 from shivam091/0.7.1
Browse files Browse the repository at this point in the history
0.7.1
  • Loading branch information
shivam091 committed May 24, 2023
2 parents 4371ccc + e557763 commit 2a1087c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ You can find recent releases with docs in GitHub:

https://github.com/shivam091/rails_bootstrap_form/releases

## [0.7.1](https://github.com/shivam091/rails_bootstrap_form/compare/v0.7.0...v0.7.1) - 2023-05-24

### What's new
- Added wrapper method for `weekday_select`.

## [0.7.0](https://github.com/shivam091/rails_bootstrap_form/compare/v0.6.2...v0.7.0) - 2023-05-24

### What's new
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rails_bootstrap_form (0.7.0)
rails_bootstrap_form (0.7.1)
actionpack (~> 7.0)
activemodel (~> 7.0)

Expand Down
2 changes: 2 additions & 0 deletions lib/rails_bootstrap_form/inputs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module Inputs
autoload :TimeZoneSelect
autoload :UrlField
autoload :WeekField
autoload :WeekdaySelect

include Base
include CheckBox
Expand Down Expand Up @@ -71,5 +72,6 @@ module Inputs
include TimeZoneSelect
include UrlField
include WeekField
include WeekdaySelect
end
end
21 changes: 21 additions & 0 deletions lib/rails_bootstrap_form/inputs/weekday_select.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

module RailsBootstrapForm
module Inputs
module WeekdaySelect
extend ActiveSupport::Concern

included do
def weekday_select(attribute, options = {}, html_options = {}, &block)
options = {bootstrap_form: {field_class: "form-select"}}.deep_merge!(options)

field_wrapper_builder(attribute, options, html_options) do
super(attribute, options, html_options, &block)
end
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/rails_bootstrap_form/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# -*- warn_indent: true -*-

module RailsBootstrapForm
VERSION = "0.7.0".freeze
VERSION = "0.7.1".freeze
REQUIRED_RAILS_VERSION = "~> 7.0".freeze
end
2 changes: 1 addition & 1 deletion spec/rails_bootstrap_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

RSpec.describe RailsBootstrapForm do
it "has a valid version number" do
expect(RailsBootstrapForm::VERSION).to eq("0.7.0")
expect(RailsBootstrapForm::VERSION).to eq("0.7.1")
end

it "has a valid rails version number" do
Expand Down

0 comments on commit 2a1087c

Please sign in to comment.