Skip to content

Commit

Permalink
Remove deprecated DSL syntax for richtext editors
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed May 5, 2019
1 parent e9a7ad6 commit e0b390d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 34 deletions.
4 changes: 0 additions & 4 deletions lib/rails_admin/config/fields/types/ck_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ class CKEditor < RailsAdmin::Config::Fields::Types::Text
register_instance_option :partial do
:form_ck_editor
end

[:base_location, :config_js, :location].each do |key|
register_deprecated_instance_option :"ckeditor_#{key}", key
end
end
end
end
Expand Down
4 changes: 0 additions & 4 deletions lib/rails_admin/config/fields/types/code_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ class CodeMirror < RailsAdmin::Config::Fields::Types::Text
register_instance_option :partial do
:form_code_mirror
end

[:assets, :config, :css_location, :js_location].each do |key|
register_deprecated_instance_option :"codemirror_#{key}", key
end
end
end
end
Expand Down
4 changes: 0 additions & 4 deletions lib/rails_admin/config/fields/types/froala.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ class Froala < RailsAdmin::Config::Fields::Types::Text
register_instance_option :partial do
:form_froala
end

[:config_options, :css_location, :js_location].each do |key|
register_deprecated_instance_option :"froala_#{key}", key
end
end
end
end
Expand Down
18 changes: 0 additions & 18 deletions lib/rails_admin/config/fields/types/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ class Text < RailsAdmin::Config::Fields::Base
# Register field type for the type loader
RailsAdmin::Config::Fields::Types.register(self)

[:ckeditor, :ckeditor_base_location, :ckeditor_config_js, :ckeditor_location].each do |key|
register_deprecated_instance_option key do
raise("The 'field(:foo){ ckeditor true }' style DSL is deprecated. Please use 'field :foo, :ck_editor' instead.")
end
end

[:codemirror, :codemirror_assets, :codemirror_config, :codemirror_css_location, :codemirror_js_location].each do |key|
register_deprecated_instance_option key do
raise("The 'field(:foo){ codemirror true }' style DSL is deprecated. Please use 'field :foo, :code_mirror' instead.")
end
end

[:bootstrap_wysihtml5, :bootstrap_wysihtml5_config_options, :bootstrap_wysihtml5_css_location, :bootstrap_wysihtml5_js_location].each do |key|
register_deprecated_instance_option key do
raise("The 'field(:foo){ bootstrap_wysihtml5 true }' style DSL is deprecated. Please use 'field :foo, :wysihtml5' instead.")
end
end

register_instance_option :html_attributes do
{
required: required?,
Expand Down
4 changes: 0 additions & 4 deletions lib/rails_admin/config/fields/types/wysihtml5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ class Wysihtml5 < RailsAdmin::Config::Fields::Types::Text
register_instance_option :partial do
:form_wysihtml5
end

[:config_options, :css_location, :js_location].each do |key|
register_deprecated_instance_option :"bootstrap_wysihtml5_#{key}", key
end
end
end
end
Expand Down

0 comments on commit e0b390d

Please sign in to comment.