#RubyOnRails - 26 March 2019
« Back 1 day Forward 1 day »
[02:26:56] xco: is there a Rails method that can convert times in different time zones? Example given the current time in New York, it tells me what the local time in Berlin is?
[02:28:58] cerberussg: I am looking sorry wasnt trying to be smart just staing what needs done had similar issue with something else
[02:33:29] cerberussg: so looks like two lookups one getting your in_time_zone time then checking with Time.zone.parse(@time).dst?
[02:42:20] cerberussg: ^^ above just needs the date of the time lookup, as that determines if DST is active or not. I stated time but isnt factual just need the date for the check.
[06:26:48] sf_starfox: quick question,if I have a big table (100M rows) and I want to run a migration that adds a column with the default to that table, will the rake db:migrate lock the entire DB or just that table? (I'm using Postgres 9.6)
[10:50:42] funkytwig: Hi, got rails_admin working but config/initializers/rails_admin.rb missing. In fact I dont even have a initializers directory.
[15:04:08] ss942: https://dpaste.de/vQE5 ← why that happen? I mean "CustomFieldsHelper.instance_methods.include? :show_value" returns true, but when i call it with CUstomFieldsHelper.show_value it returns undefined_method. Why?
[19:43:45] Scriptonaut: hey all, I want to get some input from you guys. Every project I've ever worked on, we ran the staging server in a "staging" env, with RAILS_ENV='staging'. Someone I work with thinks that it will cause issues, and wants to run the staging server with RAILS_ENV='production'. What is the standard way to do it nowadays? Run staging in 'staging' or 'production'
[19:46:21] Scriptonaut: my reasoning is that we want different settings for staging, like the log level should be "debug", api's should point to sandboxes, it should read/write to staging buckets, etc. Running it in production would mean that it would run the risk of modifying customer data when we're testing things in staging. The alternative is that we use a single production.rb file for both staging and prod servers,
[19:46:28] Scriptonaut: and then use environment variables to load the various differences. I like the idea of just putting that stuff in staging.rb (or in the credentials.yml file if it's sensitive)