ruby-install ruby 3.1.4 -- --with-openssl-dir=/opt/homebrew/opt/openssl@1.1
This is for Apple Silicon, change the path to open ssl for Intel, you can find the path with brew info openssl@1.1
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance_tag| | |
fragment = Nokogiri::HTML.fragment(html_tag) | |
field = fragment.at('input,select,textarea') | |
error_message = instance_tag.error_message.join(", ") | |
html = if field | |
debugger | |
field.add_class("is-danger") | |
html = <<-HTML |
ruby-install ruby 3.1.4 -- --with-openssl-dir=/opt/homebrew/opt/openssl@1.1
This is for Apple Silicon, change the path to open ssl for Intel, you can find the path with brew info openssl@1.1
Document the steps we took to setup the academies database.
The following will be required:
sip
include
will add the module after the class in the ancestor chain,
can call the instance methods, you will not see the methods in ls class
prepend
will add the module before the class in the ancestor chain,
can call the instance methods, you will not see the methods in ls class
extend
will add the module methods but not effect the ancestor chain,
any methods will be added as class methods and you will see instance methods in ls class
ffmpeg -i video.mov -vf "fps=10,scale=420:-1:flags=lanczos" -loop 0 animated.gif
ack <search term> -l --print0 | xargs -0 sed -i '' 's/<search term>/<replacement term>/g'
config.assets.debug = false | |
config.assets.compile = false | |
config.assets.digest = true |
require 'csv' | |
file = "path/to/file" | |
CSV.open("tmp/schools_mp.csv", "wb") do |csv| | |
csv << School.attribute_names | |
School.includes(:local_authority, :local_authority_district).select(&:condition?).each do |school| | |
csv << school.attributes.values | |
end | |
end |