Notes for updating the Hotrails.dev Turbo Rails tutorial to Ruby 3.4 / Rails 8.1
- I just did
rails new quote-editor --css=sass. I figure SQLite and javascript import maps are just fine and closer to the defaults. We'll see how this pans out :)
Notes for updating the Hotrails.dev Turbo Rails tutorial to Ruby 3.4 / Rails 8.1
rails new quote-editor --css=sass. I figure SQLite and javascript
import maps are just fine and closer to the defaults. We'll see how this pans
out :)| function printRoutePaths(router, prefix) { | |
| router.stack.forEach(function(r){ | |
| if (r.route?.path){ | |
| for (let key in r.route.methods) { | |
| if (r.route.methods[key]) { | |
| console.log(`${key.toUpperCase()} ${prefix}${r.route.path}`) | |
| } | |
| } | |
| } else if (r.name === 'router') { | |
| let newPrefix = r.regexp.toString().replace('/^\\', '').replace('\\/?(?=\\/|$)/i', '') |
| [{ "city" : "AGAWAM", "loc" : [ -72.622739, 42.070206 ], "pop" : 15338, "state" : "MA", "_id" : "01001" } | |
| ,{ "city" : "CUSHMAN", "loc" : [ -72.51564999999999, 42.377017 ], "pop" : 36963, "state" : "MA", "_id" : "01002" } | |
| ,{ "city" : "BARRE", "loc" : [ -72.10835400000001, 42.409698 ], "pop" : 4546, "state" : "MA", "_id" : "01005" } | |
| ,{ "city" : "BELCHERTOWN", "loc" : [ -72.41095300000001, 42.275103 ], "pop" : 10579, "state" : "MA", "_id" : "01007" } | |
| ,{ "city" : "BLANDFORD", "loc" : [ -72.936114, 42.182949 ], "pop" : 1240, "state" : "MA", "_id" : "01008" } | |
| ,{ "city" : "BRIMFIELD", "loc" : [ -72.188455, 42.116543 ], "pop" : 3706, "state" : "MA", "_id" : "01010" } | |
| ,{ "city" : "CHESTER", "loc" : [ -72.988761, 42.279421 ], "pop" : 1688, "state" : "MA", "_id" : "01011" } | |
| ,{ "city" : "CHESTERFIELD", "loc" : [ -72.833309, 42.38167 ], "pop" : 177, "state" : "MA", "_id" : "01012" } | |
| ,{ "city" : "CHICOPEE", "loc" : [ -72.607962, 42.162046 ], "pop" : 23396, "state" : "MA", "_id" : "01013" } | |
| ,{ "city" : "CHICOPEE", "loc" : [ |
| diff --git a/app/models/enrollment_state.rb b/app/models/enrollment_state.rb | |
| index 66e9700..c6caf91 100644 | |
| --- a/app/models/enrollment_state.rb | |
| +++ b/app/models/enrollment_state.rb | |
| @@ -7,6 +7,7 @@ class EnrollmentState < ActiveRecord::Base | |
| validates_presence_of :enrollment_id | |
| self.primary_key = 'enrollment_id' | |
| + self.lock_optimistically = false | |
I hereby claim:
To claim this, I am signing this object:
| Greetings Industry Colleagues, | |
| The School of Computing at the University of Utah will be holding our annual Senior Capstone Demonstration Wednesday, April 27th from 1:30-4:30 in Warnock Engineering Building L130 (with pizza and awards following). On this day, our seniors will show off the software projects they and their teams have completed over the past 6 months. | |
| Judges: | |
| The demonstration is open to all, but we ask any of you who are willing to come (or send another representative) as a judge. The judges walk around and talk to the students, and then score them on a 1-10 scale. At the end of the day, these scores are used to name the top teams for the day. Judging is a great time to really get to interact with our students and see what they are capable of. | |
| Prizes: | |
| We are also asking for "prize" donations from any of your companies that are able to so. We award these prizes to our students in recognition of their hard work. Prizes in the past have ranged from graphics cards to company pens. Any ty |
| # Current gotcha's: | |
| # - any result to be cached in the ivar (currently not true for the early return) | |
| # - if any of the early return stuff, or if the session.key is created, we don't want to run brand_config_for_account(opts) | |
| def active_brand_config(opts={}) | |
| @active_brand_config_cache ||= {} | |
| return @active_brand_config_cache[opts] if @active_brand_config_cache.key?(opts) | |
| @active_brand_config_cache[opts] = begin | |
| return nil if !use_new_styles? || (@current_user.try(:prefers_high_contrast?) && !opts[:ignore_high_contrast_preference]) | |
| brand_config = if session.key?(:brand_config_md5) |
| AwesomePrint.defaults = { | |
| :indent => 2, | |
| :sort_keys => true, | |
| :color => { | |
| :args => :greenish, | |
| :array => :pale, | |
| :bigdecimal => :blue, | |
| :class => :yellow, | |
| :date => :greenish, | |
| :falseclass => :red, |
| linere = /(\S+):(\d+):\s*(.*)(Setting\.get(_or_set)?\(.*(\))?)(.*)/ | |
| settingre = /['"](\S+)['"], (.*)\)/ | |
| File.readlines('settings.txt').each do |line| | |
| if linematch = line.match(linere) | |
| all, filename, linenumber, before, setting, or_set, after = linematch.to_a | |
| if settingmatch = setting.match(settingre) | |
| all, name, default = settingmatch.to_a | |
| puts "#### #{name}\n* default: `#{default}`\n* usage: `#{before}#{setting}#{after}`\n* location: `#{filename}:#{linenumber}`\n\n" | |
| end |
| " classic conundrum | |
| nnoremap <up> <nop> | |
| nnoremap <down> <nop> | |
| nnoremap <left> <nop> | |
| nnoremap <right> <nop> | |
| inoremap <up> <nop> | |
| inoremap <down> <nop> | |
| inoremap <left> <nop> | |
| inoremap <right> <nop> |