User's current time zone
Closed this issue · 3 comments
fzf commented
Great gem! I am loving playing around with it.
I am wondering if there is any way to inject the users current time zone similar to how https://github.com/basecamp/local_time works.
Thanks!
fzf commented
Nevermind. You can use the html-columns solution to just pass in the local_time.
bogdan commented
I usually do some workarounds like:
time_column(:created_at)
def self.time_column(name, &block)
column(name) do |model|
format(block&.call || model.public_send(name)) do |value|
local_time(value) # or any other helper
end
end
end