Activity Graph

Page 1 of 5 | Next »


[14:04:15] Psy-Q: has joined #RubyOnRails
[14:05:11] Psy-Q: is there some easyish way to log the raw request that gets sent during a test? my real requests work but the ones sent by rspec_api_documentation do something weird during POSTs and the server freaks out
[14:05:46] Psy-Q: my other rspec requests work too, just the ones sent in rspec_api_documentation post requests fail
[14:24:48] Psy-Q: the httplog gem doesn't seem to work since it seems these things aren't "real" HTTP POST requests. they also don't show up in any network dump since they don't seem to be using TCP
[14:31:01] Psy-Q: i think the rspec_api_documentation gem is adding some extraneous stuff, if i override what it sends in raw_post, it works just fine
[14:46:23] Psy-Q: ah, figured it out. the way the with_options block is described for rspec_api_documentation isn't very clear
[14:46:59] Psy-Q: setting a :scope on with_options will set it, but any parameters inside the block can overwrite it, so you might end up with stuff in places of your JSON where it shouldn't be
[14:47:43] Psy-Q: no easy way to solve this if you're working with multidimensional hashes, i guess, except specifying the entire depth of the scope of each single parameter


[00:01:02] Psy-Q: Read error: Connection reset by peer


[15:07:17] Psy-Q: i'm trying to run a rails console in production mode on a docker container to poke around the DB a little. but getting: Could not find rake-12.3.3 in any of the sources (even though "gem list | grep rake" shows that version is installed)
[15:08:57] Psy-Q: rake --version also works and shows 12.3.3, just "rails c" fails
[15:13:02] Psy-Q: hmm, seems to have been an issue in Rails
[15:13:08] Psy-Q: i upgraded to Rails 5.2.3 and the issue disappears
[15:23:19] Psy-Q: crankharder: just "rails c" (also tried bundle exec rails c with the same result). but since newer Rails seems to fix it, i'm happy again :)


[13:44:25] Psy-Q: has joined #RubyOnRails
[13:45:11] Psy-Q: i've been out of the Rails hosting thing for a bunch of years, what is an accepted approach these days? puma behind an HTTP proxy (that does SSL termination)?
[14:04:06] Psy-Q: seems unicorn itself might be the fancier option


[15:11:16] Psy-Q: has joined #RubyOnRails
[15:47:28] Psy-Q: has left #RubyOnRails: ("Leaving")


[13:15:05] Psy-Q: has left #ruby: ("Leaving")
[13:15:17] Psy-Q: has left #RubyOnRails: ("Leaving")


[00:00:19] Psy-Q: Read error: Connection reset by peer
[00:02:35] Psy-Q: has joined #ruby
[00:02:48] Psy-Q: has joined #RubyOnRails


[01:48:34] Psy-Q: *.net *.split
[02:45:15] Psy-Q: has joined #RubyOnRails
[02:45:17] Psy-Q: has joined #ruby


[00:00:18] Psy-Q: Read error: Connection reset by peer
[00:00:37] Psy-Q: has joined #ruby
[00:00:48] Psy-Q: has joined #RubyOnRails


[12:45:28] Psy-Q: Ping timeout: 245 seconds
[12:51:14] Psy-Q: has joined #ruby
[12:51:31] Psy-Q: has joined #RubyOnRails


[01:12:39] Psy-Q: Ping timeout: 245 seconds
[01:16:04] Psy-Q: has joined #ruby


[14:35:14] Psy-Q: is there something like puma nowadays that can be exposed in production, skipping apache/nginx entirely?
[15:12:26] Psy-Q: snk: ah, right. i just heard there's some fancy new kid in town and can't for the life of me remember the name
[15:12:51] Psy-Q: with the major downside being a bit slow delivery of raw files, but that wouldn't matter in e.g. an API situation


[10:02:47] Psy-Q: i'm really struggling implementing JSON-API "relationships", e.g. expose a relationship JSON on accounts/1/contacts but a full contact object unter /contacts/1
[10:03:16] Psy-Q: and also, how do i write a controller that handles only the relationship updates under accounts/1/contacts but actual object changes on /contacts? this is hell
[12:41:59] Psy-Q: i'm still too dumb to catch RoutingError in production and produce usable JSON output. it just produces a blank response and i can't catch ActionController::RoutingError in any controller
[12:43:09] Psy-Q: i've tried a catch-all route but what would i return from it so that things keep working? the code does reach the catch-all method, but something is always missing for Rails to continue processing the request (some env var for example)
[12:48:31] Psy-Q: ah, fuck me. i guess there is no RoutingError to catch anymore if one has a catch-all route
[12:48:45] Psy-Q: since as far as the router is concerned, it found a matching route...
[13:01:57] Psy-Q: yeah, i guess i have to do that
[13:02:32] Psy-Q: since there doesn't seem to be a good way to let JSON-speaking clients know about routes that aren't found (also, i can't even remember what a full non-API-mode rails app does when a route is not found -- 404 HTML response?)
[13:25:46] Psy-Q: thanks. i have to render JSON-API-style error objects, i'll just point people at the docs to the API so they can find out which routes are valid
[13:25:59] Psy-Q: in the description element


[01:00:28] Psy-Q: Read error: Connection reset by peer
[01:01:56] Psy-Q: has joined #ruby
[01:01:56] Psy-Q: has joined #RubyOnRails


[07:43:45] Psy-Q: Ping timeout: 246 seconds
[07:45:47] Psy-Q: has joined #ruby
[07:45:47] Psy-Q: has joined #RubyOnRails


[08:39:53] Psy-Q: i've set debug_exception_response_format to :api and am sending requests with "Content-Type: application/vnd.api+json" but still getting error responses in text/html. what might be the problem?
[10:34:14] Psy-Q: and i still haven't figured out how i can trap RoutingError and give a JSON response


[01:00:41] Psy-Q: Read error: Connection reset by peer
[01:01:10] Psy-Q: has joined #ruby
[01:01:10] Psy-Q: has joined #RubyOnRails


[15:32:34] Psy-Q: wha, we have ActiveJob now?
[15:32:40] Psy-Q: how times change


[09:03:44] Psy-Q: as soon as i want to add additional information to a relation, habtm won't cut it, it needs to be has_many :through an intermediary model, right? (e.g. "contact_type" to an association between accounts and their contacts, so i can figure out which contacts are owners and which ones technical)
[09:12:33] Psy-Q: great, thanks
[12:00:18] Psy-Q: fox_mulder_cp: oh, i never had to use that kind of setup, it's only very simple here for the moment. accounts have many contacts (owners or technical contacts), that's all
[12:00:29] Psy-Q: i hope i never have to do proper ACL on this :|
[12:59:54] Psy-Q: well crap, i had a column called contact_type in a has_many :through table and AR really really didn't like it
[13:00:26] Psy-Q: started complaining about created_at not having a default value in the contacts table, even though i didn't touch any of that
[13:00:38] Psy-Q: renamed it to contact_mode and now at least saving contacts works again
[13:16:08] Psy-Q: i think i may be trying something that AR isn't meant to do. can i not "simply" make it automatically set a type or a mode on a contactable so that it's clear whether a contact in this case is an owner or a technical contact for an account?
[13:16:38] Psy-Q: if i had to write the queries by hand i could bang that together, but i can't think if and how i can do it with AR
[13:17:37] Psy-Q: i'm feeling like there's just some magic needed in the relationship on L29,30 and boom
[13:30:30] Psy-Q: i can make it *read* a contact as an owner with this, but how about saving? not sure this is the right way to go: has_many :owners, -> { where("contactables.contact_mode='owner'") }, through: :contactables, source: 'contact'
[13:34:57] Psy-Q: tbuehlmann: and how do you save the contact as an owner? i'm exposing this via REST and don't want people to have to mess around in the association table, i was hoping AR could do it?
[13:36:31] Psy-Q: yeah, it was there in the beginning, but that's not what they want. the big problem is that contacts can be either owners or technical contacts or even none of those. one big contacts table for all purposes, some contacts would be owners and techs for some accounts, but only owners for others
[13:37:57] Psy-Q: yes. and either as owner or as tech or even both
[13:38:18] Psy-Q: kinda like a more fully normalized version of a WHOIS database
[13:40:57] Psy-Q: yeah, but i don't know how to tell it that a newly saved contactable is an owner. account.owners << '') will leave the contact_mode field on contactables empty
[13:41:12] Psy-Q: since it can't infer from anywhere that it's an owner (i'm guessing?)
[13:42:24] Psy-Q: phew, that'll be a bit of a horror to expose to jsonapi
[13:43:01] Psy-Q: and if someone uses the client code wrong and assigns an owner like i did above, it will never be retrievable as an owner again
[13:43:59] Psy-Q: weird that this isn't a pattern of some sort? having a normalized contacts table where you can use the same contact for many purposes but keep each contact record unique sounds like something reasonably common, no?
[13:45:44] Psy-Q: it works by creating the contactable by hand, thanks. i might hack it like this until maybe a better way pops up
[13:46:58] Psy-Q: if i do it like this, nothing, that'll work fine
[13:47:24] Psy-Q: but if i used a contact type/mode directly on the contact, for example, a contact would be duplicated if it is a tech contact and also an owner
[13:49:01] Psy-Q: maybe i didn't explain it well enough. i do want a join table, and i do want to put the kind of relationship (owner or technical) on the link itself
[13:49:28] Psy-Q: but i fail to see how to teach AR to set the kind of relationship automatically depending on whether i assign a contact as technical or owner to an account
[13:50:13] Psy-Q: i'll update the paste to include the scope that seems to work for reading now
[13:52:22] Psy-Q: account =; c = 'foo@bar.baz'); account.owners << c; # should set contact_mode of Contactables.first to 'owner'
[13:52:36] Psy-Q: maybe it's because i want something less than polymorphism and this is usually solved with polymorphism?
[13:53:02] Psy-Q: i will see how hackable that is. i saw that you can put extensions in those things
[13:55:04] Psy-Q: now i'm curious :|
[13:58:57] Psy-Q: brilliant!
[13:59:08] Psy-Q: thanks a ton :D i knew there *must* be some way AR can determine it
[13:59:42] Psy-Q: OK, so now i have a beautifully normalized database and just a big headache for how to expose it, but that headache was there before as well
[14:25:38] Psy-Q: oh hell, (y) renders as a thumbs up emoji on some clients/systems?
[14:25:46] Psy-Q: i've been puzzling about that for at least 12 years now


[12:51:56] Psy-Q: has joined #ruby
[12:52:28] Psy-Q: it looks like Slate was never updated to work with Bundler 2 and relies on Bundler 1. is there a way to have both available at the same time on a system?
[13:05:13] Psy-Q: it looks like it can fall back to the version that is specified under BUNDLED_WITH in the lockfile if that version is available, but what if there is no lockfile yet?


[20:59:27] Psy-Q: Ping timeout: 240 seconds
[21:01:00] Psy-Q: has joined #RubyOnRails


[06:42:11] Psy-Q: *.net *.split
[06:42:35] Psy-Q: has joined #RubyOnRails


[15:27:28] Psy-Q: i'm trying to build a catchall controller that responds to a final catchall route so i can give a decent JSON response to RoutingError. it's not going well. simply using "render json:" doesn't seem to work because Rails expects response, request objects and other stuff to be there (?)
[15:28:02] Psy-Q: when i give it those, it turns into "#<Module::DelegationError: ActionController::Metal#status= delegated to @_response.status=, but @_response is nil" (well, because response is "response", if it isn't, it explodes earlier than this)
[15:30:05] Psy-Q: do i simply fill those up as well and give it @_response = response; @_request = request; @_env = request.env ?
[15:32:14] Psy-Q: hm, that makes it stop complain but the first middleware in the chain falls over
[15:34:08] Psy-Q: because it can't do since @app isn't there. phew.
[16:19:28] Psy-Q: i think i'm barking up a lot of wrong trees with this
[16:22:29] Psy-Q: it turns out i was probably using a method name that is sort of reserved by controllers higher up the food chain: dispatch
[16:35:23] Psy-Q: eh, but i can't rescue ActionController::RoutingError in the catchall controller either


[10:29:25] Psy-Q: has joined #RubyOnRails
[10:30:24] Psy-Q: is there something that'd help me render the typical HTML you get for a ActionController::RoutingError with all the nice routes in form of JSON instead?
[10:36:11] Psy-Q: oh, so i'd render that into a var and spit it out inside a json? the thing is supposed to respond only to application/vnd.api+json
[10:36:25] Psy-Q: i didn't know there were text/plain versions of those error pages somewhere
[11:59:05] Psy-Q: can i not rescue_from ActionController::RoutingError? the code never reaches that rescue and instead responds with its own 404: "exception": "#<ActionController::RoutingError: No route matches [GET] \"/asdf\">"
[11:59:23] Psy-Q: i'm trying rescue_from in ApplicationController
[12:35:31] Psy-Q: ah, seemingly all of that happens before the controller is even initialized
[12:42:23] Psy-Q: it's just a bit unelegant since in API mode it seems that Rails gives absolutely no response to routing errors when in production
[12:53:30] Psy-Q: tbuehlmann: phew, where would i slot that in so that anything i don't handle still gets passed on to the rest of the Rack/Rails handlers for that sort of stuff? i saw that some people do do things like config.exceptions_app = self.routes, but is that really smart?
[13:11:40] Psy-Q: oooh! okay, that's more sexy!
[13:12:06] Psy-Q: i hope the RoutingError will hit that too, gonna try it
[13:30:51] Psy-Q: tbuehlmann: thanks, the catch-all will be creating loads of fun times
[13:31:16] Psy-Q: and just doing nothing appears to make it continue as if it's not there
[13:32:36] Psy-Q: ah not quite. well, have to figure that out then
[13:41:50] Psy-Q: yeah, the middleware isn't liking it, it ends up with an empty env. have to figure out why that gets eaten


[09:11:57] Psy-Q: has left #RubyOnRails: ("...")


[09:07:40] Psy-Q: hm. i can hit 99
[09:07:50] Psy-Q: maybe i'll train for 120! :)


[08:43:35] Psy-Q: my issues from thursday with newly created related records not being saved had to do with validations deep, deep inside the chain of related stuff failing
[08:43:54] Psy-Q: so the first associated record did save, the second one became invalid because the first had saved and triggered a uniqueness validation :P


[09:32:40] Psy-Q: has joined #RubyOnRails
[09:37:31] Psy-Q: can i not assign two new instances of an AR model to another AR model in a while loop? like so:
[09:37:48] Psy-Q: it seems only one database is ever assigned with e.g. @db_count = 2, the other one disappears
[09:50:38] Psy-Q: hc is an unsaved record at the time, i need to assign lots of related models to it before it gets saved
[11:50:26] Psy-Q: i can't figure this out
[11:50:53] Psy-Q: why when i add two of those database records and hc.databases shows them plain and clear, both records are valid, when i save hc it saves only the first database?


[01:00:22] Psy-Q: Read error: Connection reset by peer


[09:30:51] Psy-Q: is there something that makes symmetric encryption of certain values that go into the database easier? i need to store passwords encrypted at rest but decrypt them and give them out as plaintext to authenticated clients (they don't need to have a matching public key)
[09:33:21] Psy-Q: oh, that should be exactly right
[09:33:40] Psy-Q: it should only protect from e.g. misconfigured database privileges that might allow other tenants of the same DB cluster to read the data
[09:35:15] Psy-Q: that looks exactly like what i want, thanks :) i was pondering to do it with plain OpenSSL::Cipher but it looks like that gem takes care of all that already
[10:50:02] Psy-Q: somehow the magic that makes the unencrypted attribute names work isn't working
[10:50:39] Psy-Q: i renamed my password to encrypted_password and gave it an encrypted_password_iv, but it looks like the call for e.g. password=(foo) isn't being intercepted
[11:29:54] Psy-Q: hrm, yeah, something is fishy with that
[11:29:58] Psy-Q: also: DEPRECATION WARNING: password is not an attribute known to Active Record. This behavior is deprecated and will be removed in the next version of Rails.
[11:30:54] Psy-Q: i can't use the attribute e.g in a before_validation hook, i can use it "plainly" if i just do dbu =; dbu.password = 'foobar'
[12:40:33] Psy-Q: ah, i see. the docs point at an outdated version
[12:50:12] Psy-Q: nope, it still explodes when assigning anything to e.g. self.password. maybe something changed in ActiveRecord since the last release of that gem
[13:19:24] Psy-Q: nah, that error was on me. but it seems to be unable to deal with any previously existing records because they lack an IV
[13:40:18] Psy-Q: so either you use this gem from the very start of your project or not at all? that's odd
[13:45:30] Psy-Q: i'll detect if there's an IV and try to generate one if not, reload and resave all the records, that might work
[13:56:25] Psy-Q: grmpf, that doesn't work either
[13:59:22] Psy-Q: oh i see, it's a bug in attr_encrypted itself:


[10:04:52] Psy-Q: so now i'm using after_initialize to set some defaults in a model instead of initialize as recommended in some places. how can i force client code to provide a specific argument, though? for that i'd still need a constructor, no?
[10:15:11] Psy-Q: jane_booty_doe: no, just generally for all client code. it's an API-only Rails app
[10:36:45] Psy-Q: it's long and a bit too complicated class, but what i want is to require a value for server_name when creating: hosting = '')
[10:36:56] Psy-Q: i can trim it down to show it
[10:42:30] Psy-Q: something like this:
[10:43:03] Psy-Q: the server_name i want to require is a real ActiveRecord attribute, if that helps
[12:11:14] Psy-Q: tbuehlmann: but it would still explode right after calling .new because it can't even instantiate an instance since after_initialize tries to run then, no?
[12:11:26] Psy-Q: or you mean doing that right inside after_initialize perhaps?
[12:16:32] Psy-Q: that seems to work, i'm raising ArgumentError from there now
[12:48:29] Psy-Q: and i may be misunderstanding validates_associated. if a hosting validates_associated hosting_configuration, and hosting_configuration validates associated apache_server_aliases, shouldn't a save on hosting fail when validations on apache_server_aliases fail?
[13:13:04] Psy-Q: this is weird, the hosting record is not .valid?, neither is the hosting.hosting_configuration one, but activerecord saves the hosting_one anyhow for some reason
[13:13:18] Psy-Q: and still shows hosting.hosting_configuration.valid? as false
[13:14:16] Psy-Q: oh weird, if i try to save it again it fails to save at that point. something must be wrong with the validations


[13:12:14] Psy-Q: overriding initialize seems to be discouraged in ActiveRecord. how can i pass some parameters in that are just used for a bunch of class variables, not persisted to the DB (so they don't have columns)?


[16:17:16] Psy-Q: has joined #RubyOnRails
[16:18:49] Psy-Q: this is just an experimental class i'm throwing together, but why in the world would not work? it throws NoMethodError (undefined method `fish' for #<Hosting:0x000056516f27e090>). the "same" methods further up work fine
[16:19:11] Psy-Q: it doesn't matter what i put into errors.add, it's always that error


[06:30:56] Psy-Q: is it normal that i have to set Rails.application.routes.default_url_options by hand if i run in API mode? it seems the URL helpers can't construct URLs otherwise, i get "Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true"
[06:52:17] Psy-Q: which is inconvenient when you put the thing behind e.g. Passenger under multiple ServerAliases


[13:16:10] Psy-Q: can i not have a resource nested in singular with only: 'show', but also in plural on the rootlevel so i get post/put/patch there?
[13:17:52] Psy-Q: like such:
[13:19:28] Psy-Q: it wants to give me the routes in singular style: POST /hosting_configurations(.:format)
[13:22:58] Psy-Q: ah no, maybe it's correct and i fucked up
[13:28:54] Psy-Q: i fucked up, carry on


[13:21:13] Psy-Q: i don't understand how a block passed to authenticate_or_request_with_http_basic would work. when i return false inside it, it counts as successful authentication. but the examples seem to just compare usernames/passwords which would return true and pass the auth test, no? why doesn't false fail it?
[13:41:48] Psy-Q: the token part works, not the basic part
[13:46:08] Psy-Q: nzst: problem is i have a general catch-all for RecordNotFound in the application controller, so that'll trigger on any unfound user
[13:46:36] Psy-Q: i will check if it's hitting l6, i had a binding.pry there earlier and i think it was called
[13:46:59] Psy-Q: yes, it's triggering that, i'm in pry on l6 now
[13:48:02] Psy-Q: i can remove the catch-all and the rescue to test
[13:49:27] Psy-Q: if i simply return false from that block (no other code in it) it still lets all requests through, seems to ignore the basic authentication so i'm probably using this wrong
[14:02:01] Psy-Q: but all the examples i find and the source suggest you just return false or true, that's all, that's it
[14:11:07] Psy-Q: this also just gives true: ActiveSupport::SecurityUtils.secure_compare("foo", "foo") & ActiveSupport::SecurityUtils.secure_compare("bar", "bar")


[00:00:16] Psy-Q: Read error: Connection reset by peer
[00:00:44] Psy-Q: has joined #ruby
[00:00:44] Psy-Q: has joined #RubyOnRails


[04:55:12] Psy-Q: Ping timeout: 252 seconds
[05:00:28] Psy-Q: has joined #ruby
[05:00:28] Psy-Q: has joined #RubyOnRails


[08:07:18] Psy-Q: it seems jsonapi-rb is unmaintained since mid-2017, is there another good thing for building jsonapi APIs?


[08:04:12] Psy-Q: is it evil coupling if i set some defaults on a model before saving and those defaults are different depending on whether some other model is associated to it? e.g. DatabaseConfiguration will produce unique database names when saved on its own, but if there is an associated HostingConfiguration it will create a prefix for each database based on details from there


[13:55:37] Psy-Q: Ping timeout: 272 seconds
[13:59:30] Psy-Q: has joined #RubyOnRails


[11:47:48] Psy-Q: can i use the ActiveRecord validations standalone? like validate_numericality_of(this_var)?
[11:50:18] Psy-Q: ah, hrm. that's a bit inconvenient since what needs validation comes from a free-form JSON hash and depending on what's further up in the hash, different types of validations further down would need to trigger
[11:50:40] Psy-Q: maybe i can do something with if: to if down all the way into the hash
[11:58:50] Psy-Q: hm, it's not even finding its is_hosting? method right inside the same class when i use if: is_hosting? as in the example. NoMethodError. weird.
[12:00:16] Psy-Q: ah, it wants the symbol. all good :)
[12:01:32] Psy-Q: yes, this could work. i do the branching up top in validates_with: MyFooValidator, if: is_giraffe?
[12:01:54] Psy-Q: and then i have many MyFooValidators that include just ActiveModel validations they need depending on the shape of the hash
[12:02:16] Psy-Q: i mean if: :is_giraffe? of course, no good making the same mistake twice
[12:19:00] Psy-Q: ah, damn. that won't work. since it's nested and i can't do validates_numericality_of :my_hash['something_deep']['inside_of_me']
[12:23:02] Psy-Q: not quite sure, since the shape of the array is arbitrary and i only need to validate some elements that are guaranteed to be there
[12:23:55] Psy-Q: like configuration['mysql_database'] = true, that can only be true or false and not nil. and if it's true then there can also be configuration['mysql_database_name'] = 'foobar' which must be a string and unique
[12:24:33] Psy-Q: i just saw a gem called dry-validation that allows you to write a validation schema and then applies that to any data structure (ruby hash, whatever). maybe that's a better option
[12:26:05] Psy-Q: i thought the built-in validations might be best because.. they're built in :) but maybe they are simply wrong if you're not validating things that are actual fields on your model
[12:26:31] Psy-Q: this is the gem
[13:22:43] Psy-Q: i got it to validate nested things. now i just need to propagate the error messages properly upwards


[16:28:27] Psy-Q: Ping timeout: 240 seconds
[16:30:55] Psy-Q: has joined #RubyOnRails


[00:00:15] Psy-Q: Read error: Connection reset by peer
[00:01:17] Psy-Q: has joined #RubyOnRails
[13:41:37] Psy-Q: is there something more lightweight than Postman for playing with REST interfaces?
[13:42:32] Psy-Q: i've tried RESTclient in Firefox but recent versions seem to have been broken (they claim null responses when they aren't there, or claim the response is binary when it isn't)


[08:09:16] Psy-Q: how do i set an explicit charset on DBs and tables with the mysql2 AR adapter? it uses utf8mb4_general_ci on local mariadb, utf8_general_ci on staging, but i want it to go with utf8mb4_unicode_ci everywhere
[08:30:33] Psy-Q: the connection encoding alone doesn't seem to punch that through, it doesn't care about collation
[08:40:42] Psy-Q: ah, i will change it "manually" on the existing stuff, no biggie. just as long as i can ensure it is created explicitly with utf8mb4_unicode_ci on all the database servers, no matter what their defaults are
[08:41:16] Psy-Q: thanks, i will look at the mysql2 adapter's specific migration options in that case
[08:44:05] Psy-Q: ah, it's just an SQL fragment? ok, gonna have to check if all the mariadbs and mysqls out there use the same syntax
[11:07:38] Psy-Q: hrmf. i'd have to influence the options of the CREATE DATABASE statement used by db:create as well
[11:07:54] Psy-Q: to make sure the default collation is the one i want


[00:00:16] Psy-Q: Read error: Connection reset by peer
[00:01:47] Psy-Q: has joined #RubyOnRails
[10:17:27] Psy-Q: let's say you're building a API following JSON-API, in order to update relationships, would you accept a POST or PATCH to e.g. authors/1/books with the changed relationships as payload?
[10:17:50] Psy-Q: the spec always talks about an explicit relationships URL but that seems cumbersome with rails


[07:45:22] Psy-Q: Ping timeout: 256 seconds
[07:48:32] Psy-Q: has joined #RubyOnRails


[00:07:20] Psy-Q: *.net *.split
[00:15:25] Psy-Q: has joined #RubyOnRails


[05:19:34] Psy-Q: Ping timeout: 260 seconds
[05:21:39] Psy-Q: has joined #RubyOnRails
[05:38:27] Psy-Q: Ping timeout: 240 seconds
[05:40:41] Psy-Q: has joined #RubyOnRails


[00:00:21] Psy-Q: Read error: Connection reset by peer
[00:00:45] Psy-Q: has joined #RubyOnRails


[15:29:45] Psy-Q: anyon use jsonapi-rb's Deserializable::Resource? the documentation is missing and i can't get it to do anything, if i use the bit of documentation there is to add a deserializable :server resource to my controller, it fails with: undefined method `to_unsafe_hash' for nil:NilClass
[16:03:55] Psy-Q: ah apparently it's an issue when you don't set the correct content-type on your request
[16:04:22] Psy-Q: but now i'm onto the next issue, it explodes completely when it gets malformed JSON and i know no way to present a nice JSON error to the client in such cases :)


[14:25:14] Psy-Q: ah, okay. then i'll do that :)
[14:25:24] Psy-Q: i thought i had missed some super-elegant way
[14:28:27] Psy-Q: yes, potentially
[14:28:56] Psy-Q: awesome, thanks
[15:38:57] Psy-Q: why does ActiveRecord try to DROP TABLE 'accounts' when i merely try to remove one of its columns?
[15:40:04] Psy-Q: might be some sqlite thing but i don't get it
[15:51:51] Psy-Q: oh, this seems to be a sqlite limitation, it cannot drop single columns.. i guess i should test with mysql instead, eh