Skip to content

Commit 4b47b69

Browse files
committed
Remove deprecated float positional classes from ingredients
They have been replaced by `css_classes` in your ingredients settings.
1 parent b753515 commit 4b47b69

3 files changed

Lines changed: 3 additions & 31 deletions

File tree

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
<% css_classes = ingredient.settings[:css_classes] %>
2-
31
<%= f.input :link_text %>
42
<%= f.input :title %>
5-
<%- if css_classes.present? -%>
6-
<%= f.input :css_class,
7-
collection: css_classes,
8-
include_blank: Alchemy.t('None') %>
9-
<%- else -%>
10-
<% Alchemy::Deprecation.warn %(Float positioning in File ingredients is deprecated. If you rely on them, please use `css_classes` in your "#{ingredient.role}" settings instead.) %>
11-
<%= f.input :css_class,
12-
label: Alchemy.t(:position_in_text),
13-
collection: [
14-
[Alchemy.t(:above), "no_float"],
15-
[Alchemy.t(:left), "left"],
16-
[Alchemy.t(:right), "right"]
17-
], include_blank: Alchemy.t('Layout default') %>
18-
<%- end -%>
3+
<%= f.input :css_class,
4+
collection: ingredient.settings[:css_classes],
5+
include_blank: Alchemy.t('None') %>

app/views/alchemy/admin/ingredients/_picture_fields.html.erb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,4 @@
1919
end
2020
end %>
2121
<%= f.input :css_class, collection: css_classes_collection, include_blank: false %>
22-
<%- else -%>
23-
<% Alchemy::Deprecation.warn %(Float positioning in Picture ingredients is deprecated. If you rely on them, please use `css_classes` in your "#{ingredient.role}" settings instead.) %>
24-
<%= f.input :css_class,
25-
label: Alchemy.t(:position_in_text),
26-
collection: [
27-
[Alchemy.t(:above), "no_float"],
28-
[Alchemy.t(:left), "left"],
29-
[Alchemy.t(:right), "right"]
30-
], include_blank: Alchemy.t("Layout default") %>
3122
<%- end -%>

spec/views/alchemy/admin/ingredients/edit_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
view.instance_variable_set(:@ingredient, ingredient)
99
end
1010

11-
around do |example|
12-
Alchemy::Deprecation.silence do
13-
example.run
14-
end
15-
end
16-
1711
context "for a picture ingredient" do
1812
let(:image) do
1913
fixture_file_upload(

0 commit comments

Comments
 (0)