Skip to content

Commit

Permalink
Merge pull request #290 from github/public-format
Browse files Browse the repository at this point in the history
All ViewComponents have an :html format
  • Loading branch information
joelhawksley authored Apr 7, 2020
2 parents 0efeb32 + 75977c1 commit 8d2ae18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# master

* Add `Base.format` for better compatibility with `ActionView::Template`.

*Joel Hawksley*

# v2.2.1

* Fix bug where template could not be found if `inherited` was redefined.
Expand Down
4 changes: 4 additions & 0 deletions lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ def type
"text/html"
end

def format
:html
end

def identifier
source_location
end
Expand Down

0 comments on commit 8d2ae18

Please sign in to comment.