Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
Rails.application.config.filter_parameters += %i[
passw email secret token _key crypt salt certificate otp ssn cvv cvc
]
10 changes: 8 additions & 2 deletions lib/bootstrap_form/form_builder.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# require 'bootstrap_form/aliasing'

module BootstrapForm
class FormBuilder < ActionView::Helpers::FormBuilder
class FormBuilder < ActionView::Helpers::FormBuilder # rubocop:disable Metrics/ClassLength
attr_reader :layout, :label_col, :control_col, :has_error, :inline_errors,
:label_errors, :acts_like_form_tag

class << self
def redefine_rich_text_area?
ActionView::Helpers::FormBuilder.instance_methods.any? { _1 == :rich_text_area }
end
end

include BootstrapForm::Helpers::Field
include BootstrapForm::Helpers::Bootstrap

Expand Down Expand Up @@ -32,7 +38,7 @@ class FormBuilder < ActionView::Helpers::FormBuilder
include BootstrapForm::Inputs::PhoneField
include BootstrapForm::Inputs::RadioButton
include BootstrapForm::Inputs::RangeField
include BootstrapForm::Inputs::RichTextArea if Gem.loaded_specs["actiontext"]
include BootstrapForm::Inputs::RichTextArea if redefine_rich_text_area?
include BootstrapForm::Inputs::SearchField
include BootstrapForm::Inputs::Select
include BootstrapForm::Inputs::Submit
Expand Down