1
我有一個user
模型:帶有日期使用phoenix_html_simplified_helpers
defmodule AddressBook.User do
use AddressBook.Web, :model
schema "users" do
field :last_name, :string
field :birthday, Ecto.Date
[...]
我想用https://github.com/ikeikeikeike/phoenix_html_simplified_helpers呈現time_ago_in_words
爲birthday
:
<%= time_ago_in_words user.birthday %> ago
但導致這個錯誤:
我該如何解決這個問題?