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: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ nav_order: 5

*Stephen Nelson*

* Remove unnecessary `#format` methods that returned `nil`.

*Joel Hawksley*

* Clean up project dependencies, relaxing versions of development gems.

*Joel Hawksley*
Expand Down
6 changes: 0 additions & 6 deletions lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,6 @@ def view_cache_dependencies
[]
end

# Rails expects us to define `format` on all renderables,
# but we do not know the `format` of a ViewComponent until runtime.
def format
nil
end

# The current request. Use sparingly as doing so introduces coupling that
# inhibits encapsulation & reuse, often making testing difficult.
#
Expand Down
6 changes: 0 additions & 6 deletions lib/view_component/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ def each(&block)
components.each(&block)
end

# Rails expects us to define `format` on all renderables,
# but we do not know the `format` of a ViewComponent until runtime.
def format
nil
end

private

def initialize(component, object, spacer_component, **options)
Expand Down
Loading