Closed Jiaxinl7 closed 4 years ago
Hey @midnight-blue
When you passed in the attribute, you need to just give it a single symbol. This isn't valid Ruby syntax: attribute: :start.date_time
because you can't have a period in the symbol of :start.date_time
.
If your column is called date_time
then you would just use attribute: :date_time
.
If you have this nested in like a json column or something, you'll want to just add a method that can access it, rather than having to call event.start.date_time
. I would add a start_time
method that would call the start.date_time
on your event in that case.
Hi When I try to set google calendar's start.date_time as the attribute of month_calendar:
There is NoMethodError: undefined method `date_time' for :start:Symbol
But when I try to set non-nested ones, like updated, as the attribute:
attribute: :updated
It worked well. BTW, when I render the event.start.date_time directly in the same page, it looks all right. I just can't set it as the attribute successfully. How could I solve this problem? Thank you!Gloria