Skip to content

Commit

Permalink
edited readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Krüger committed Nov 25, 2020
1 parent e720288 commit 73ad43e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ You can start adding new phrases by simply adding them in your view file:

<%= phrase('my-first-phrase') %>

If you want the key not to be the default phrase, you can define one like here:

<%= phrase('my-first-phrase',default: 'default phrase') %>

Aside from editing phrases (basically, Rails translations) you can also edit model attributes inline. Use the same `phrase` method, with the first attribute being the record in question, and the second one the attribute you wish to make editable:

<%= phrase(@post, :title) %>
Expand Down

0 comments on commit 73ad43e

Please sign in to comment.