Skip to content

Commit

Permalink
remove deprecations
Browse files Browse the repository at this point in the history
deprecate nested_subforms setting, as code for disabled nested_subforms is removed
  • Loading branch information
scambra committed Oct 23, 2024
1 parent 3f1d761 commit 3c5f4a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@
next unless in_subform?(column, parent_record, record_column)
columns_length += 1
show_actions = true
if !ActiveScaffold.nested_subforms && !readonly && column.association && column.form_ui.nil?
ActiveSupport::Deprecation.warn "Nested subforms are allowed now, set form_ui = :select for #{column.name} in controller for #{config.model.name}"
column = column.dup unless ActiveScaffold.threadsafe
column.form_ui = :select
end

col_class = default_col_class.clone
col_class << 'required' if column.required?(action_for_validation?(record))
Expand Down
3 changes: 3 additions & 0 deletions lib/active_scaffold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ def self.exclude_bridges
end

mattr_accessor :nested_subforms, instance_writer: false
def nested_subforms=(*)
ActiveSupport::Deprecation.warn "Nested subforms are enabled by default already"
end

def self.root
File.dirname(__FILE__) + '/..'
Expand Down
5 changes: 0 additions & 5 deletions lib/active_scaffold/data_structures/action_links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@ def respond_to_missing?(name, *)
attr_accessor :weight
attr_accessor :css_class

def name=(value)
ActiveSupport::Deprecation.warn "Changing name is deprecated, use css_class to change the class html attribute"
self.css_class = value
end

protected

# called during clone or dup. makes the clone/dup deeper.
Expand Down

0 comments on commit 3c5f4a1

Please sign in to comment.