#RubyOnRails - 19 November 2018
« Back 1 day
[11:30:38] gavit: execjs seems to support nodejs, however I can't find any documentation on how to make nodejs integrate with rails, do I need to add a gem etc, or should I just install nodejs and it should work out of the box
[11:49:46] adgtl: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_users_on_email"
[11:49:48] adgtl: : INSERT INTO "users" ("created_at", "updated_at", "id") VALUES ('2018-11-19 11:49:08.706871', '2018-11-19 11:49:08.706871', 298486374)
[16:49:07] Aces1up: hey all i have been searching around but can not find an answer to this. when i save a datetime to column in rails I know it saves it as utc.. How can I later do a query on that datetime to see if it has passed a certain time in another timezone?
[16:49:47] Aces1up: it is as simple as querying the database using a datetime object set with a different timezone and AR knows what to do from there?
[18:02:38] tubbo: AR is gonna convert the UTC timestamps into the timezone specified by rails in your config
[18:02:59] tubbo: but you can get it to convert to another timezone by using #in_time_zone. https://api.rubyonrails.org/v5.2.1/classes/ActiveSupport/TimeWithZone.html#method-i-in_time_zone
[19:20:22] tubbo: quarters: well, what i meant by "private gem source" was a server, like https://gems.yourcompany.com