Skip to content

Commit

Permalink
Update copy
Browse files Browse the repository at this point in the history
  • Loading branch information
bradgessler committed Jan 30, 2024
1 parent c6c62f0 commit 7747654
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ render Nav

## Why render HTML in Ruby?

Building components in Ruby makes it possible to build powerful abstractions. The `Nav` menu above could be refactored into the following Ruby class.
Building components in Ruby makes it possible to build powerful abstractions. The `Nav` menu above could be refactored into a Ruby class to allow developers to add items to the menu without needing to understand the underlying HTML.

```phlex
class Nav < Phlex::HTML
Expand All @@ -48,7 +48,7 @@ render Nav.new do |nav|
end
```

Which can be called from Ruby or Erb without a bunch of `<% %>` tags.
The component can be called from Ruby or Erb without a bunch of `<% %>` tags.

```ruby
render Nav.new do |nav|
Expand Down

0 comments on commit 7747654

Please sign in to comment.