Rails 4 model returns always nil

后端 未结 3 807
不知归路
不知归路 2021-01-14 03:02

I am going crazy with the following error. I have a User class and two of its attributes (birthday & created_at => datetime) returns always nil besides it has a value on

3条回答
  •  失恋的感觉
    2021-01-14 03:39

    config.active_record.default_timezone requires a symbol, either :local or :utc.

    config.time_zone requires a regular time zone as you have done.

    config.active_record.default_timezone determines whether to use Time.local (if set to :local) or Time.utc (if set to :utc) when pulling dates and times from the database. The default is :utc.

    http://guides.rubyonrails.org/configuring.html#configuring-active-record

提交回复
热议问题