Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley committed Apr 28, 2021
1 parent ce10bf5 commit ac218a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: API

### #before_render → [void]

Called before rendering the component.
Called before rendering the component. Override to perform operations that depend on having access to the view context, such as helpers.

### #before_render_check → [void] (Deprecated)

Expand All @@ -21,7 +21,7 @@ _Use `before_render` instead. Will be removed in v3.0.0._

### #render? → [Boolean]

Whether the ViewComponent should render.
Override to determine whether the ViewComponent should render.

### #controller → [ActionController::Base]

Expand Down
4 changes: 2 additions & 2 deletions lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def render_in(view_context, &block)
@current_template = old_current_template
end

# Called before rendering the component.
# Called before rendering the component. Override to perform operations that depend on having access to the view context, such as helpers.
#
# @return [void]
def before_render
Expand All @@ -114,7 +114,7 @@ def before_render_check
# noop
end

# Whether the ViewComponent should render.
# Override to determine whether the ViewComponent should render.
#
# @return [Boolean]
def render?
Expand Down

0 comments on commit ac218a3

Please sign in to comment.