https://tad.thorley.dev/2021/01/31/vue-for-the-html-you-already-have.html excellent link on integrating vue and rails
Interesting link on asset gems basically discusses a way around memory bloat of loading asset oriented gems in production. Seems completely reasonable to me.
http://blog.heapsource.com/post/55696145680/effortless-two-factor-authentication-in-rails
https://evilmartians.com/chronicles/how-to-graphql-with-ruby-rails-active-record-and-no-n-plus-one
http://www.sitepoint.com/lite-spec-helper-faster-rails-tests/
http://stackoverflow.com/questions/9822624/rails-isolated-tests-running-under-rails-env
http://viget.com/extend/8-insanely-useful-activeadmin-customizations
http://www.sitepoint.com/basecamp-like-subdomains-with-devise/
flog, flay, rails-best-practice : test out these gems
# useful for printing out SQL console
ActiveRecord::Base.logger = Logger.new(STDOUT)
Uploading from a file and multi type attachments and nice dropzone tutorial
# if you need to set the timezone for users.. just make sure the time_zone
# returns something sensible
class ApplicationController
around_filter :set_timezone_for_this_request, if: :current_user
def set_timezone_for_this_request(&block)
Time.use_zone(current_user.time_zone, &block)
end
end
# Set up a custom logger. View output in /log/my_error.log
class MyLogger < Logger
def format_message(severity, timestamp, progname, msg)
"[%s] %s\n" % [timestamp.to_s(:short), msg]
end
end
logfile = File.open(Rails.root.to_s + '/log/my_error.log','a')
logfile.sync = true
MYLOG = MyLogger.new(logfile)
# TO USE: MYLOG.info(<stuff>) (or whatever level of debug info you want to use)
Page created on 8 Jul 2021