#RubyOnRails - 04 January 2019
« Back 1 day Forward 1 day »
[06:31:39] tushark: The app is using both Rails and Vue on the frontend part. Should I go with the `serviceworker-rails` gem or any other method?
[12:48:22] pavelz: I tried using make_resourful but it is way out of date, is there a way to shrink resourceful controllers? example what make_resourceful did: https://github.com/hcatlin/make_resourceful
[22:30:47] ponzii: My Ruby version is 2.6.0 but when I try `bin/rails/server` I get "Your Ruby version is 2.5.3, but your Gemfile specified 2.6.0"
[22:49:28] benlieb: I have the unfortunate task of making some legacy data work with a rails ap. Some of the id fields are strings
[22:50:20] benlieb: PG::UndefinedFunction: ERROR: operator does not exist: bigint = character varying LINE 1: ...ients" INNER JOIN "reservation" ON "clients"."id" = "reserva...
[22:50:34] benlieb: No operator matches the given name and argument type(s). You might need to add explicit type casts.
[22:54:24] drale2k_: Man i am having a hard time wrapping my head around Asset Pipeline vs Webpacker
[23:31:40] benlieb: Cany anyone help me with this legacy foreign_key string issue? https://stackoverflow.com/questions/54047261/rails-association-for-legacy-data-when-foreign-key-is-string
[23:32:42] benlieb: drale2k_: I would say that the asset pipeline and webpacker were built for different purposes, but some of their functionality overlaps
[23:36:37] benlieb: havenwood: they are in a legacy db that the new app I’m writing is reading from. In the clients table the id is INT, but the associate key for some ungodly reason is string
[23:37:55] benlieb: If I could somehow cast the client_id to int, that would work, but I think the pg gem is checking the property time directly
[23:42:13] benlieb: the client_id doesn’t increment it’s just an association, but clients.id increments and is INT
[23:43:25] benlieb: Valid keys are: :class_name, :anonymous_class, :foreign_key, :validate, :autosave, :foreign_type, :dependent, :primary_key, :inverse_of, :required, :polymorphic, :touch, :counter_cache, :optional, :default
[23:43:43] havenwood: benlieb: See here: https://guides.rubyonrails.org/active_record_postgresql.html#uuid