Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Explain new template format
  • Loading branch information
jaredcwhite authored Nov 3, 2023
1 parent 3dd0f4b commit 3e1e3eb
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lifeform

Component-centric form object rendering for Ruby. Powered by [Phlex](https://www.phlex.fun)
Component-centric form object rendering for Ruby.

## Installation

Expand Down Expand Up @@ -38,17 +38,6 @@ And a template rendering of:
<% end %>
```

```rb
# Or Phlex:
def template
render TestForm.new(url: "/path") do |f|
render f.field(:occupation)
render f.field(:age, value: 47)
render f.field(:submit)
end
end
```

You get the following HTML output:

```html
Expand All @@ -69,7 +58,7 @@ You get the following HTML output:

Nested names based on models (aka `profile[name]`) and inferred action paths are supported as well.

Multiple component libraries and input types—and easy customizability via [Phlex](https://github.com/joeldrapper/phlex) templates—are a fundamental aspect of the architecture of Lifeform.
Multiple component libraries and input types—and easy customizability using string interpolation templates and helpers—are a fundamental aspect of the architecture of Lifeform. Until further docs have been written, you can look in `lib/lifeform/libraries` to see how some initial field types were constructed.

### Automatic Field Rendering

Expand Down

0 comments on commit 3e1e3eb

Please sign in to comment.