alchemy_cms 5.1.0 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -1
  3. data/CHANGELOG.md +51 -0
  4. data/Gemfile +2 -1
  5. data/alchemy_cms.gemspec +2 -2
  6. data/app/assets/stylesheets/alchemy/_variables.scss +2 -0
  7. data/app/assets/stylesheets/alchemy/elements.scss +38 -5
  8. data/app/controllers/alchemy/admin/base_controller.rb +1 -0
  9. data/app/controllers/alchemy/admin/trash_controller.rb +2 -0
  10. data/app/decorators/alchemy/content_editor.rb +64 -0
  11. data/app/decorators/alchemy/element_editor.rb +67 -0
  12. data/app/helpers/alchemy/admin/contents_helper.rb +3 -8
  13. data/app/helpers/alchemy/elements_helper.rb +0 -18
  14. data/app/helpers/alchemy/pages_helper.rb +3 -1
  15. data/app/models/alchemy/attachment.rb +4 -0
  16. data/app/models/alchemy/content.rb +7 -0
  17. data/app/models/alchemy/element.rb +38 -0
  18. data/app/models/alchemy/element/definitions.rb +5 -22
  19. data/app/models/alchemy/page/page_elements.rb +9 -2
  20. data/app/models/alchemy/picture_variant.rb +1 -1
  21. data/app/views/alchemy/admin/elements/_element.html.erb +1 -1
  22. data/app/views/alchemy/admin/elements/_element_footer.html.erb +1 -1
  23. data/app/views/alchemy/admin/elements/_element_header.html.erb +2 -0
  24. data/app/views/alchemy/admin/elements/_element_toolbar.html.erb +1 -1
  25. data/config/brakeman.ignore +305 -17
  26. data/config/locales/alchemy.en.yml +40 -24
  27. data/lib/alchemy/deprecation.rb +1 -1
  28. data/lib/alchemy/element_definition.rb +70 -0
  29. data/lib/alchemy/elements_finder.rb +6 -2
  30. data/lib/alchemy/essence.rb +4 -4
  31. data/lib/alchemy/filetypes.rb +13 -0
  32. data/lib/alchemy/forms/builder.rb +1 -1
  33. data/lib/alchemy/i18n.rb +4 -5
  34. data/lib/alchemy/page_layout.rb +1 -0
  35. data/lib/alchemy/resource.rb +5 -3
  36. data/lib/alchemy/test_support.rb +18 -0
  37. data/lib/alchemy/test_support/essence_shared_examples.rb +0 -3
  38. data/lib/alchemy/test_support/factories.rb +11 -0
  39. data/lib/alchemy/test_support/factories/attachment_factory.rb +0 -2
  40. data/lib/alchemy/test_support/factories/content_factory.rb +0 -6
  41. data/lib/alchemy/test_support/factories/dummy_user_factory.rb +0 -2
  42. data/lib/alchemy/test_support/factories/element_factory.rb +0 -3
  43. data/lib/alchemy/test_support/factories/essence_file_factory.rb +0 -3
  44. data/lib/alchemy/test_support/factories/essence_page_factory.rb +0 -3
  45. data/lib/alchemy/test_support/factories/essence_picture_factory.rb +0 -4
  46. data/lib/alchemy/test_support/factories/essence_text_factory.rb +0 -2
  47. data/lib/alchemy/test_support/factories/language_factory.rb +0 -3
  48. data/lib/alchemy/test_support/factories/node_factory.rb +0 -4
  49. data/lib/alchemy/test_support/factories/page_factory.rb +0 -3
  50. data/lib/alchemy/test_support/factories/picture_factory.rb +0 -2
  51. data/lib/alchemy/test_support/factories/picture_thumb_factory.rb +0 -3
  52. data/lib/alchemy/test_support/factories/site_factory.rb +0 -2
  53. data/lib/alchemy/test_support/integration_helpers.rb +5 -5
  54. data/lib/alchemy/version.rb +1 -1
  55. data/lib/alchemy_cms.rb +1 -0
  56. metadata +8 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7244fdbb3c06cd1c7375f6006d94e5b5b16a860d62fb9268fedc79a42d52e7fd
4
- data.tar.gz: 1b46460a9e387144126d5d4d17a905697e6a80dc8d480743dcbd5a0c8c99d3ca
3
+ metadata.gz: 80ac30c5b218ae66fdfc00afbaf2185829f52e94b32b76c4b6af8a19c5ec2ac8
4
+ data.tar.gz: 3da61ba5c95787cd3524ffad4e36f774b238fcf0456732a0cf69dac24dcbf0e7
5
5
  SHA512:
6
- metadata.gz: e4c138b229e5653765b5ae2ade3a34acdc644a489891ae4664e878e6c7c8ecb32080d76403a167a0d2b05d5349be0903628a6c747cfeae1bec927571d1094928
7
- data.tar.gz: '08fde58900a7e4359888c5409d59f8492f94025b14f131d69526acef5b0cd4378c39af534624e35edc47b2fa2d55a738db366ae9c349056db3a22ae00277ed6a'
6
+ metadata.gz: 690da4b19ddbc96671c403bb616da433c37b35eeb0eee142de4f1ebe957f4f7ad9cd0da1e8e8e9e37cb773fbe1aec858166089673921b1ff463bc1dd0028bf91
7
+ data.tar.gz: 9f937fdb379c6df8c64976ec52ae4aef56bf597533e1d3ece0c987ef4604d91dfdb75eb246ce9aa68338d1a1814941f53d982093b378ab8089b3026f8997582b
@@ -4,7 +4,7 @@ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  RSpec:
7
- runs-on: ubuntu-latest
7
+ runs-on: ubuntu-18.04
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
@@ -14,6 +14,7 @@ jobs:
14
14
  ruby:
15
15
  - '2.5.x'
16
16
  - '2.6.x'
17
+ - '2.7.x'
17
18
  database:
18
19
  - mysql
19
20
  - postgresql
data/CHANGELOG.md CHANGED
@@ -1,3 +1,50 @@
1
+ ## 5.2.0 (2021-05-06)
2
+
3
+ - Backport #2049 to 5.2 [#2086](https://github.com/AlchemyCMS/alchemy_cms/pull/2086) ([rickythefox](https://github.com/rickythefox))
4
+ - hotfix and deprecate page_active? helper [#2073](https://github.com/AlchemyCMS/alchemy_cms/pull/2073) ([robinboening](https://github.com/robinboening))
5
+
6
+ ## 5.2.0.rc1 (2021-02-17)
7
+
8
+ ### Changes
9
+
10
+ - Change Factory loading mechanism to FactoryBots supported mechanism [#2030](https://github.com/AlchemyCMS/alchemy_cms/pull/2030) ([mamhoff](https://github.com/mamhoff))
11
+
12
+ ## 5.2.0.b1 (2021-02-11)
13
+
14
+ ### Features
15
+
16
+ - Allow Element and Content deprecation notices [#1988](https://github.com/AlchemyCMS/alchemy_cms/pull/1988) ([tvdeyen](https://github.com/tvdeyen))
17
+ - Add element definition api (based on PageLayout definitions) [#1986](https://github.com/AlchemyCMS/alchemy_cms/pull/1986) ([stockime](https://github.com/stockime))
18
+
19
+ ### Changes
20
+
21
+ - Fix jpeg quality option for jpeg files [#2016](https://github.com/AlchemyCMS/alchemy_cms/pull/2016) ([kulturbande](https://github.com/kulturbande))
22
+ - Pin Ransack to below 2.4.2 [#2012](https://github.com/AlchemyCMS/alchemy_cms/pull/2012) ([tvdeyen](https://github.com/tvdeyen))
23
+ - Fix setting current_user in integration helper [#2006](https://github.com/AlchemyCMS/alchemy_cms/pull/2006) ([tvdeyen](https://github.com/tvdeyen))
24
+ - Update mime type icons and translations [#2002](https://github.com/AlchemyCMS/alchemy_cms/pull/2002) ([tvdeyen](https://github.com/tvdeyen))
25
+ - Deprecate page layout change [#1993](https://github.com/AlchemyCMS/alchemy_cms/pull/1993) ([tvdeyen](https://github.com/tvdeyen))
26
+ - Fix Ruby 2.7 deprecations [#1989](https://github.com/AlchemyCMS/alchemy_cms/pull/1989) ([tvdeyen](https://github.com/tvdeyen))
27
+ - Deprecate trash [#1985](https://github.com/AlchemyCMS/alchemy_cms/pull/1985) ([tvdeyen](https://github.com/tvdeyen))
28
+ - Deprecate elements fallbacks [#1982](https://github.com/AlchemyCMS/alchemy_cms/pull/1982) ([tvdeyen](https://github.com/tvdeyen))
29
+
30
+ ### Misc
31
+
32
+ - Use Ubuntu 18.04 on GH actions [#2018](https://github.com/AlchemyCMS/alchemy_cms/pull/2018) ([tvdeyen](https://github.com/tvdeyen))
33
+ - [ruby - main] Upgrade rubocop to version 1.9.0 [#2011](https://github.com/AlchemyCMS/alchemy_cms/pull/2011) ([depfu](https://github.com/apps/depfu))
34
+ - [ruby - main] Upgrade rubocop to version 1.8.1 [#1999](https://github.com/AlchemyCMS/alchemy_cms/pull/1999) ([depfu](https://github.com/apps/depfu))
35
+ - Update brakeman ignores [#1992](https://github.com/AlchemyCMS/alchemy_cms/pull/1992) ([tvdeyen](https://github.com/tvdeyen))
36
+ - [ruby - main] Upgrade rubocop to version 1.6.1 [#1978](https://github.com/AlchemyCMS/alchemy_cms/pull/1978) ([depfu](https://github.com/apps/depfu))
37
+ - [ruby - main] Upgrade simplecov to version 0.20.0 [#1971](https://github.com/AlchemyCMS/alchemy_cms/pull/1971) ([depfu](https://github.com/apps/depfu))
38
+
39
+ ## 5.1.2 (2021-01-26)
40
+
41
+ - Allow to safe hidden elements [#2007](https://github.com/AlchemyCMS/alchemy_cms/pull/2007) ([tvdeyen](https://github.com/tvdeyen))
42
+
43
+
44
+ ## 5.1.1 (2021-01-12)
45
+
46
+ - Fix copy element feature [#1996](https://github.com/AlchemyCMS/alchemy_cms/pull/1996) ([tvdeyen](https://github.com/tvdeyen))
47
+
1
48
  ## 5.1.0 (2020-12-18)
2
49
 
3
50
  ### Features
@@ -58,6 +105,10 @@
58
105
  - [ruby] Upgrade rubocop to version 0.88.0 [#1892](https://github.com/AlchemyCMS/alchemy_cms/pull/1892) ([depfu](https://github.com/apps/depfu))
59
106
  - [ruby] Upgrade rubocop to version 0.87.1 [#1889](https://github.com/AlchemyCMS/alchemy_cms/pull/1889) ([depfu](https://github.com/apps/depfu))
60
107
 
108
+ ## 5.0.3 (2021-01-12)
109
+
110
+ - Fix copy element feature [#1996](https://github.com/AlchemyCMS/alchemy_cms/pull/1996) ([tvdeyen](https://github.com/tvdeyen))
111
+
61
112
  ## 5.0.2 (2020-12-18)
62
113
 
63
114
  - Fix page sorting [#1984](https://github.com/AlchemyCMS/alchemy_cms/pull/1984) ([tvdeyen](https://github.com/tvdeyen))
data/Gemfile CHANGED
@@ -22,7 +22,7 @@ group :development, :test do
22
22
  gem "yard"
23
23
  gem "redcarpet"
24
24
  gem "pry-byebug"
25
- gem "rubocop", "~> 1.1.0", require: false
25
+ gem "rubocop", "~> 1.9.0", require: false
26
26
  gem "listen"
27
27
  gem "localeapp", "~> 3.0", require: false
28
28
  gem "dotenv", "~> 2.2"
@@ -30,5 +30,6 @@ group :development, :test do
30
30
  gem "active_record_query_trace", require: false
31
31
  gem "rack-mini-profiler", require: false
32
32
  gem "rufo", require: false
33
+ gem "brakeman", require: false
33
34
  end
34
35
  end
data/alchemy_cms.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |gem|
33
33
  gem.add_runtime_dependency 'originator', ['~> 3.1']
34
34
  gem.add_runtime_dependency 'non-stupid-digest-assets', ['~> 1.0.8']
35
35
  gem.add_runtime_dependency 'rails', ['>= 5.2.0', '< 6.1']
36
- gem.add_runtime_dependency 'ransack', ['>= 1.8', '< 3.0']
36
+ gem.add_runtime_dependency 'ransack', ['>= 1.8', '< 2.4.2'] # 2.4.2 dropped Ruby 2.5 support in a patch level release
37
37
  gem.add_runtime_dependency 'request_store', ['~> 1.2']
38
38
  gem.add_runtime_dependency 'responders', ['>= 2.0', '< 4.0']
39
39
  gem.add_runtime_dependency 'sassc-rails', ['~> 2.1']
@@ -49,7 +49,7 @@ Gem::Specification.new do |gem|
49
49
  gem.add_development_dependency 'rails-controller-testing', ['~> 1.0']
50
50
  gem.add_development_dependency 'rspec-activemodel-mocks', ['~> 1.0']
51
51
  gem.add_development_dependency 'rspec-rails', ['>= 4.0.0.beta2']
52
- gem.add_development_dependency 'simplecov', ['~> 0.17.1']
52
+ gem.add_development_dependency 'simplecov', ['~> 0.20']
53
53
  gem.add_development_dependency 'webdrivers', ['~> 4.0']
54
54
  gem.add_development_dependency 'webmock', ['~> 3.3']
55
55
  gem.add_development_dependency 'shoulda-matchers', ['~> 4.0']
@@ -145,6 +145,8 @@ $elements-window-min-width: 400px !default;
145
145
  $element-header-bg-color: $medium-gray !default;
146
146
  $element-header-active-bg-color: $dark-blue !default;
147
147
  $element-header-active-color: $white !default;
148
+ $element-header-deprecated-bg-color: rgba(253, 213, 175, 0.25) !default;
149
+ $element-deprecated-border-color: rgb(253, 213, 175) !default;
148
150
  $top-menu-height: 75px !default;
149
151
 
150
152
  $tabs-height: 31px !default;
@@ -170,13 +170,32 @@
170
170
  }
171
171
  }
172
172
 
173
+ &.deprecated {
174
+ border-color: $element-deprecated-border-color;
175
+
176
+ > .element-header {
177
+ background-color: $element-header-deprecated-bg-color;
178
+ background-image: linear-gradient(
179
+ 45deg,
180
+ $element-header-deprecated-bg-color 25%,
181
+ $element-header-bg-color 25%,
182
+ $element-header-bg-color 50%,
183
+ $element-header-deprecated-bg-color 50%,
184
+ $element-header-deprecated-bg-color 75%,
185
+ $element-header-bg-color 75%,
186
+ $element-header-bg-color 100%
187
+ );
188
+ background-size: 28.28px 28.28px;
189
+ }
190
+ }
191
+
173
192
  &.selected:not(.is-fixed), &:hover {
174
193
  &:not(.hidden) {
175
194
  box-shadow: 0 2px 8px rgba(#9b9b9b, 0.75);
176
195
  }
177
196
  }
178
197
 
179
- &.selected:not(.is-fixed):not(.folded):not(.dirty):not(.hidden) {
198
+ &.selected:not(.is-fixed):not(.folded):not(.dirty):not(.hidden):not(.deprecated) {
180
199
  > .element-header {
181
200
  background-color: $element-header-active-bg-color;
182
201
  color: $element-header-active-color;
@@ -670,6 +689,24 @@ select.long {
670
689
  }
671
690
  }
672
691
 
692
+ &.deprecated {
693
+ border-radius: $default-border-radius;
694
+ background-color: $element-header-deprecated-bg-color;
695
+ background-image: linear-gradient(
696
+ 45deg,
697
+ $element-header-deprecated-bg-color 25%,
698
+ $element-header-bg-color 25%,
699
+ $element-header-bg-color 50%,
700
+ $element-header-deprecated-bg-color 50%,
701
+ $element-header-deprecated-bg-color 75%,
702
+ $element-header-bg-color 75%,
703
+ $element-header-bg-color 100%
704
+ );
705
+ background-size: 28.28px 28.28px;
706
+ padding-left: 2px;
707
+ padding-right: 2px;
708
+ }
709
+
673
710
  label {
674
711
  display: block;
675
712
  margin: $default-margin 0;
@@ -802,10 +839,6 @@ textarea.has_tinymce {
802
839
  }
803
840
  }
804
841
 
805
- .element-handle .hint-with-icon {
806
- top: -1px;
807
- }
808
-
809
842
  .is-fixed {
810
843
  &.with-contents {
811
844
  >.element-footer {
@@ -72,6 +72,7 @@ module Alchemy
72
72
  def trash_empty?(category)
73
73
  "alchemy/#{category.singularize}".classify.constantize.trashed.blank?
74
74
  end
75
+ deprecate :trash_empty?, deprecator: Alchemy::Deprecation
75
76
 
76
77
  def set_stamper
77
78
  if Alchemy.user_class < ActiveRecord::Base
@@ -12,12 +12,14 @@ module Alchemy
12
12
  @page = Page.find(params[:page_id])
13
13
  @allowed_elements = @page.available_element_definitions
14
14
  end
15
+ deprecate :index, deprecator: Alchemy::Deprecation
15
16
 
16
17
  def clear
17
18
  @page = Page.find(params[:page_id])
18
19
  @elements = Element.trashed
19
20
  @elements.map(&:destroy)
20
21
  end
22
+ deprecate :clear, deprecator: Alchemy::Deprecation
21
23
 
22
24
  private
23
25
 
@@ -12,6 +12,7 @@ module Alchemy
12
12
  [
13
13
  "content_editor",
14
14
  essence_partial_name,
15
+ deprecated? ? "deprecated" : nil,
15
16
  ].compact
16
17
  end
17
18
 
@@ -51,5 +52,68 @@ module Alchemy
51
52
 
52
53
  super
53
54
  end
55
+
56
+ def has_warnings?
57
+ definition.blank? || deprecated?
58
+ end
59
+
60
+ def warnings
61
+ return unless has_warnings?
62
+
63
+ if definition.blank?
64
+ Logger.warn("Content #{name} is missing its definition", caller(1..1))
65
+ Alchemy.t(:content_definition_missing)
66
+ else
67
+ deprecation_notice
68
+ end
69
+ end
70
+
71
+ # Returns a deprecation notice for contents marked deprecated
72
+ #
73
+ # You can either use localizations or pass a String as notice
74
+ # in the content definition.
75
+ #
76
+ # == Custom deprecation notices
77
+ #
78
+ # Use general content deprecation notice
79
+ #
80
+ # - name: element_name
81
+ # contents:
82
+ # - name: old_content
83
+ # type: EssenceText
84
+ # deprecated: true
85
+ #
86
+ # Add a translation to your locale file for a per content notice.
87
+ #
88
+ # en:
89
+ # alchemy:
90
+ # content_deprecation_notices:
91
+ # element_name:
92
+ # old_content: Foo baz widget is deprecated
93
+ #
94
+ # or use the global translation that apply to all deprecated contents.
95
+ #
96
+ # en:
97
+ # alchemy:
98
+ # content_deprecation_notice: Foo baz widget is deprecated
99
+ #
100
+ # or pass string as deprecation notice.
101
+ #
102
+ # - name: element_name
103
+ # contents:
104
+ # - name: old_content
105
+ # type: EssenceText
106
+ # deprecated: This content will be removed soon.
107
+ #
108
+ def deprecation_notice
109
+ case definition["deprecated"]
110
+ when String
111
+ definition["deprecated"]
112
+ when TrueClass
113
+ Alchemy.t(name,
114
+ scope: [:content_deprecation_notices, element.name],
115
+ default: Alchemy.t(:content_deprecated))
116
+ end
117
+ end
54
118
  end
55
119
  end
@@ -8,6 +8,17 @@ module Alchemy
8
8
  "alchemy/admin/elements/element"
9
9
  end
10
10
 
11
+ # Returns content editor instances for defined contents
12
+ #
13
+ # Creates contents on demand if the content is not yet present on the element
14
+ #
15
+ # @return Array<Alchemy::ContentEditor>
16
+ def contents
17
+ element.definition.fetch(:contents, []).map do |content|
18
+ Alchemy::ContentEditor.new(find_or_create_content(content[:name]))
19
+ end
20
+ end
21
+
11
22
  # CSS classes for the element editor partial.
12
23
  def css_classes
13
24
  [
@@ -17,6 +28,7 @@ module Alchemy
17
28
  taggable? ? "taggable" : "not-taggable",
18
29
  folded ? "folded" : "expanded",
19
30
  compact? ? "compact" : nil,
31
+ deprecated? ? "deprecated" : nil,
20
32
  fixed? ? "is-fixed" : "not-fixed",
21
33
  public? ? "visible" : "hidden",
22
34
  ].join(" ")
@@ -36,5 +48,60 @@ module Alchemy
36
48
 
37
49
  super
38
50
  end
51
+
52
+ # Returns a deprecation notice for elements marked deprecated
53
+ #
54
+ # You can either use localizations or pass a String as notice
55
+ # in the element definition.
56
+ #
57
+ # == Custom deprecation notices
58
+ #
59
+ # Use general element deprecation notice
60
+ #
61
+ # - name: old_element
62
+ # deprecated: true
63
+ #
64
+ # Add a translation to your locale file for a per element notice.
65
+ #
66
+ # en:
67
+ # alchemy:
68
+ # element_deprecation_notices:
69
+ # old_element: Foo baz widget is deprecated
70
+ #
71
+ # or use the global translation that apply to all deprecated elements.
72
+ #
73
+ # en:
74
+ # alchemy:
75
+ # element_deprecation_notice: Foo baz widget is deprecated
76
+ #
77
+ # or pass string as deprecation notice.
78
+ #
79
+ # - name: old_element
80
+ # deprecated: This element will be removed soon.
81
+ #
82
+ def deprecation_notice
83
+ case definition["deprecated"]
84
+ when String
85
+ definition["deprecated"]
86
+ when TrueClass
87
+ Alchemy.t(name,
88
+ scope: :element_deprecation_notices,
89
+ default: Alchemy.t(:element_deprecated))
90
+ end
91
+ end
92
+
93
+ private
94
+
95
+ def find_or_create_content(name)
96
+ find_content(name) || create_content(name)
97
+ end
98
+
99
+ def find_content(name)
100
+ element.contents.find { |content| content.name == name }
101
+ end
102
+
103
+ def create_content(name)
104
+ Alchemy::Content.create(element: element, name: name)
105
+ end
39
106
  end
40
107
  end
@@ -19,13 +19,8 @@ module Alchemy
19
19
 
20
20
  content_name = content.name_for_label
21
21
 
22
- if content.definition.blank?
23
- warning("Content #{content.name} is missing its definition")
24
-
25
- icon = hint_with_tooltip(
26
- Alchemy.t(:content_definition_missing),
27
- )
28
-
22
+ if content.has_warnings?
23
+ icon = hint_with_tooltip(content.warnings)
29
24
  content_name = "#{icon} #{content_name}".html_safe
30
25
  end
31
26
 
@@ -39,7 +34,7 @@ module Alchemy
39
34
  # Renders the label and a remove link for a content.
40
35
  def content_label(content)
41
36
  content_tag :label, for: content.form_field_id do
42
- [render_hint_for(content), render_content_name(content)].compact.join("&nbsp;").html_safe
37
+ [render_content_name(content), render_hint_for(content)].compact.join("&nbsp;").html_safe
43
38
  end
44
39
  end
45
40
  end
@@ -28,22 +28,6 @@ module Alchemy
28
28
  # <%= render_elements from_page: 'footer' %>
29
29
  # </footer>
30
30
  #
31
- # === Fallback to elements from global page:
32
- #
33
- # You can use the fallback option as an override for elements that are stored on another page.
34
- # So you can take elements from a global page and only if the user adds an element on current page the
35
- # local one gets rendered.
36
- #
37
- # 1. You have to pass the the name of the element the fallback is for as <tt>for</tt> key.
38
- # 2. You have to pass a <tt>page_layout</tt> name or {Alchemy::Page} from where the fallback elements is taken from as <tt>from</tt> key.
39
- # 3. You can pass the name of element to fallback with as <tt>with</tt> key. This is optional (the element name from the <tt>for</tt> key is taken as default).
40
- #
41
- # <%= render_elements(fallback: {
42
- # for: 'contact_teaser',
43
- # from: 'sidebar',
44
- # with: 'contact_teaser'
45
- # }) %>
46
- #
47
31
  # === Custom elements finder:
48
32
  #
49
33
  # Having a custom element finder class:
@@ -76,8 +60,6 @@ module Alchemy
76
60
  # The amount of elements to be rendered (begins with first element found)
77
61
  # @option options [Number] :offset
78
62
  # The offset to begin loading elements from
79
- # @option options [Hash] :fallback
80
- # Define elements that are rendered from another page.
81
63
  # @option options [Boolean] :random (false)
82
64
  # Randomize the output of elements
83
65
  # @option options [Boolean] :reverse (false)