« Back to channel list

#RubyOnRails - 12 August 2017

« Back 1 day Forward 1 day »
[00:00:36] jrabe: has joined #RubyOnRails
[00:00:48] jhfisc: has joined #RubyOnRails
[00:05:13] RahulT: has joined #RubyOnRails
[00:11:46] jphase: has joined #RubyOnRails
[00:14:17] jphase_: has joined #RubyOnRails
[00:31:31] RahulT: has joined #RubyOnRails
[00:31:35] jhfisc: has joined #RubyOnRails
[00:32:04] rakm: has joined #RubyOnRails
[00:34:07] rakm: has joined #RubyOnRails
[00:36:51] jhfisc: has joined #RubyOnRails
[00:41:17] rakm: has joined #RubyOnRails
[01:04:14] Rodya_: has joined #RubyOnRails
[01:04:53] jhfisc: has joined #RubyOnRails
[01:15:06] jhfisc: has joined #RubyOnRails
[01:20:02] ocpysh: has joined #RubyOnRails
[01:22:24] cam27: has joined #RubyOnRails
[01:26:51] jhfisc: has joined #RubyOnRails
[01:32:54] jhfisc: has joined #RubyOnRails
[01:37:58] jhfisc: has joined #RubyOnRails
[01:40:06] ule: Hey guys.. I have on a model here a relation: "belongs_to :company" and I have a validation like: "validates :company, presence: true"
[01:41:11] ule: if I try to insert a data like Departament.new(company: 123) it throws error saying it is expecting a company object
[01:41:50] chouhoulis: has joined #RubyOnRails
[01:41:50] ule: is it possible to create a such validation that allows both Departament.new(company: 123) or Departament.new(company: Company.find_by(123)) ?
[01:44:01] jhfisc: has joined #RubyOnRails
[01:45:41] ule: When should I use validates :company VS validates :company_id
[01:47:27] jphase: has joined #RubyOnRails
[01:54:28] ocpysh: has joined #RubyOnRails
[01:54:52] jhfisc: has joined #RubyOnRails
[02:02:13] ocpysh: has joined #RubyOnRails
[02:02:45] ule: http://railsguides.net/belongs-to-and-presence-validation-rule1/
[02:03:05] ule: ^ got an answer here in case you're curious
[02:04:50] RahulT: has joined #RubyOnRails
[02:05:57] jhfisc: has joined #RubyOnRails
[02:09:48] jhfisc: has joined #RubyOnRails
[02:16:16] jhfisc: has joined #RubyOnRails
[02:18:11] ResidentBiscuit: has joined #RubyOnRails
[02:21:54] jhfisc: has joined #RubyOnRails
[02:22:58] quirkycoders: has joined #RubyOnRails
[02:24:36] jhfisc: has joined #RubyOnRails
[02:24:51] lessless: has joined #RubyOnRails
[02:30:51] jhfisc: has joined #RubyOnRails
[02:33:41] apparition47: has joined #RubyOnRails
[02:35:21] emers2n: has joined #RubyOnRails
[02:36:25] jhfisc: has joined #RubyOnRails
[02:36:52] ocpysh: has joined #RubyOnRails
[02:48:16] brent__: has joined #RubyOnRails
[02:48:50] jhfisc: has joined #RubyOnRails
[02:55:36] jhfisc: has joined #RubyOnRails
[02:56:54] MasterAsia: how can I test use_zone
[02:57:02] MasterAsia: which only changes the timezone in the context of one request
[02:58:31] brent__: has joined #RubyOnRails
[03:01:58] irishfromua: has joined #RubyOnRails
[03:02:32] jphase: has joined #RubyOnRails
[03:08:33] jhfisc: has joined #RubyOnRails
[03:09:42] jphase: has joined #RubyOnRails
[03:10:18] quirkycoders: has joined #RubyOnRails
[03:14:10] zacts: has joined #RubyOnRails
[03:14:51] jhfisc: has joined #RubyOnRails
[03:24:44] theunraveler: has joined #RubyOnRails
[03:25:15] quirkycoders: has joined #RubyOnRails
[03:26:23] laphoraig007: has joined #RubyOnRails
[03:27:53] jphase: has joined #RubyOnRails
[03:29:34] ocpysh: has joined #RubyOnRails
[03:29:34] sevenseacat: has joined #RubyOnRails
[03:32:38] karthick: has joined #RubyOnRails
[03:33:28] irishfromua: has joined #RubyOnRails
[03:53:02] chouhoulis: has joined #RubyOnRails
[03:59:22] gambl0re: has joined #RubyOnRails
[04:05:44] chouhoulis: has joined #RubyOnRails
[04:08:49] hive-mind: has joined #RubyOnRails
[04:10:55] quazimodo: has joined #RubyOnRails
[04:16:09] chouhoulis: has joined #RubyOnRails
[04:34:16] emers2n: has joined #RubyOnRails
[04:36:09] cam27: has joined #RubyOnRails
[04:39:37] pawelbx: has joined #RubyOnRails
[04:41:28] pawelbx: i've come across some odd behavior in rails/rspec/factory girl. i have movie class and if I do Movie.find(123) it returns the record i crated, but if i do Movie.connection.execute("select * from movies where id = 123") I don't get back any results
[04:42:07] pawelbx: anyone know what might cause this?
[04:45:46] kies: has joined #RubyOnRails
[04:47:54] ocpysh: has joined #RubyOnRails
[04:58:46] apparition47: Looking for a RoR dev for at my Tokyo startup. Visa-sponsored gig. Details: https://tokyo.craigslist.jp/sof/6259513460.html?lang=en&cc=us
[05:04:16] cjk101010: has joined #RubyOnRails
[05:08:25] cjk101010: has left #RubyOnRails: ("Konversation terminated!")
[05:14:42] jhfisc: has joined #RubyOnRails
[05:23:40] nahtnam: has joined #RubyOnRails
[05:32:58] quazimodo: has joined #RubyOnRails
[05:38:20] jhfisc: has joined #RubyOnRails
[05:47:01] jhfisc: has joined #RubyOnRails
[05:59:02] jhfisc: has joined #RubyOnRails
[06:02:29] beilabs: has joined #RubyOnRails
[06:02:44] KeyJoo: has joined #RubyOnRails
[06:04:12] jhfisc: has joined #RubyOnRails
[06:09:17] jhfisc: has joined #RubyOnRails
[06:14:36] jhfisc: has joined #RubyOnRails
[06:25:59] beilabs: has joined #RubyOnRails
[06:26:33] beilabs_: has joined #RubyOnRails
[06:32:41] jhfisc: has joined #RubyOnRails
[06:38:51] jhfisc: has joined #RubyOnRails
[06:39:25] AzaToth: has joined #RubyOnRails
[06:53:40] jhfisc: has joined #RubyOnRails
[07:00:50] conta: has joined #RubyOnRails
[07:12:36] jhfisc: has joined #RubyOnRails
[07:18:51] jhfisc: has joined #RubyOnRails
[07:24:16] jhfisc: has joined #RubyOnRails
[07:50:47] srinidhi: has joined #RubyOnRails
[07:53:02] marr: has joined #RubyOnRails
[07:55:07] apparition47: has joined #RubyOnRails
[07:58:42] jhfisc: has joined #RubyOnRails
[08:03:38] jhfisc: has joined #RubyOnRails
[08:13:37] quirkycoders: has joined #RubyOnRails
[08:23:14] jhfisc: has joined #RubyOnRails
[08:29:13] jhfisc: has joined #RubyOnRails
[08:31:28] srinidhi: has joined #RubyOnRails
[08:37:02] jhfisc: has joined #RubyOnRails
[08:43:07] jhfisc: has joined #RubyOnRails
[08:49:21] jhfisc: has joined #RubyOnRails
[08:51:33] moei: has joined #RubyOnRails
[08:52:42] arBmind: has joined #RubyOnRails
[09:01:33] jhfisc: has joined #RubyOnRails
[09:07:26] jhfisc: has joined #RubyOnRails
[09:14:36] dretnx: has joined #RubyOnRails
[09:50:30] srinidhi: has joined #RubyOnRails
[09:58:19] marr: has joined #RubyOnRails
[09:58:52] jhfisc: has joined #RubyOnRails
[09:59:31] brent__: has joined #RubyOnRails
[10:06:08] jhfisc: has joined #RubyOnRails
[10:08:20] apparition47: has joined #RubyOnRails
[10:12:46] lessless: has joined #RubyOnRails
[10:20:30] jhfisc: has joined #RubyOnRails
[10:23:26] ocpysh: has joined #RubyOnRails
[10:29:00] jphase: has joined #RubyOnRails
[10:38:59] lessless: has joined #RubyOnRails
[10:47:20] Sylario: has joined #RubyOnRails
[10:48:51] jhfisc: has joined #RubyOnRails
[10:48:58] padi_: has joined #RubyOnRails
[10:54:55] jhfisc: has joined #RubyOnRails
[10:56:06] dretnx: has left #RubyOnRails: ()
[10:58:45] quirkycoders: has joined #RubyOnRails
[11:00:51] jhfisc: has joined #RubyOnRails
[11:02:20] shilon: has joined #RubyOnRails
[11:02:48] TvL2386: has joined #RubyOnRails
[11:03:54] jhfisc: has joined #RubyOnRails
[11:05:34] apparition47: has joined #RubyOnRails
[11:13:23] shilon: Hello everyone. I’m having trouble with this https://gist.github.com/jamesalbuquerque/70597efeb8238e4877f093b0a13d80d4
[11:14:38] banisterfiend: has joined #RubyOnRails
[11:15:05] shilon: I’m trying to to add to the assocations table the user_id, when creating a location. Anyone can tell my why does it only save the brand_id and location_id but not the user_id
[11:16:09] sevenseacat: youre setting the user_id after you save
[11:16:09] jhfisc: has joined #RubyOnRails
[11:16:15] sevenseacat: set it before
[11:16:48] shilon: ups, but that line shouldn’t be needed right?
[11:17:04] shilon: I get the brand_id and the location_id with the strong params
[11:17:12] sevenseacat: well if you want to set it, you need to set it somewhere
[11:17:33] shilon: with this @location = @brand.locations.create(location_params)
[11:17:38] shilon: I forgot to add the strong params
[11:17:41] shilon: wait a sec
[11:17:47] sevenseacat: youre also unnecessarily saving the record twice
[11:18:50] shilon: https://gist.github.com/jamesalbuquerque/70597efeb8238e4877f093b0a13d80d4
[11:18:58] shilon: now it’s correct
[11:19:03] shilon: but it doesnt work
[11:19:19] sevenseacat: now you're not setting it at all
[11:19:41] sevenseacat: are you submitting the user_id as part of the params?
[11:20:33] shilon: do I need to add it as a hidden_field?
[11:21:02] sevenseacat: what you had before was the correct approach
[11:21:12] shilon: so I should do @location.user_id = @user.id before save?
[11:21:25] sevenseacat: you were just setting the field after save instead of before
[11:21:45] shilon: but will that pass the user_id to the brand_locations?
[11:22:00] sevenseacat: try it and see
[11:22:14] jhfisc: has joined #RubyOnRails
[11:22:59] conta: has joined #RubyOnRails
[11:23:00] sevenseacat: it seems like your form might be backwards
[11:23:44] sevenseacat: creating a location with a nested brand_location, instead of a brand_location with a nested location
[11:24:26] sevenseacat: I'm guessing, I don't know what you're doing
[11:25:32] shilon: undefined method `user_id=' for nil:NilClass I get this
[11:25:34] sevenseacat: it looks odd to me to go brand -> location -> brand_location
[11:25:55] shilon: so it might be @brand.location.user_id = @user.id?
[11:26:56] sevenseacat: no, because a brand has multiple locations, and the user belongs to the brand location, not the location
[11:27:39] sevenseacat: ...what are you trying to do, this is confusing
[11:28:58] shilon: I want create multiple locations for a brand and add the user that created it…
[11:29:32] sevenseacat: so what's the brand location model for
[11:30:29] sevenseacat: wait, the location *and* the brand location both belong to a user...
[11:30:51] sevenseacat: can the BrandLocation model be deleted?
[11:31:08] conta: has joined #RubyOnRails
[11:32:02] shilon: maybe I don’t need it
[11:32:24] shilon: sorry. :/
[11:32:37] sevenseacat: all good, data modelling can be tricky!
[11:33:47] sevenseacat: if all it is is a link between the brand and the location, with no other properties, I'd say it can be deleted
[11:34:25] sevenseacat: and the association between brands and locations can become a has_and_belongs_to_many
[11:36:26] shilon: and with user?
[11:37:10] sevenseacat: well what do you need to record the user on?
[11:37:24] sevenseacat: the location, or the link between the two?
[11:37:50] shilon: on each location we need a user_id
[11:37:59] shilon: so we don’t need the brand_locations right?
[11:38:13] sevenseacat: the model, yes
[11:38:25] sevenseacat: the table you still need
[11:38:53] sevenseacat: I should write a blog post about this
[11:39:14] shilon: loool why?
[11:39:23] shilon: is it strange?
[11:39:25] sevenseacat: because it gets asked a lot
[11:39:43] shilon: I need to keep the brand_locations table up
[11:39:55] shilon: but I don’t need the brand_location model?
[11:40:36] shilon: don’t understand...
[11:40:58] shilon: so I’ll add 3 references :user, :brand, :location to the brand_locations table
[11:41:04] shilon: as I had previous.
[11:41:33] sevenseacat: no, you said you wanted users for locations, not brand locations
[11:41:41] sevenseacat: http://guides.rubyonrails.org/association_basics.html#choosing-between-has-many-through-and-has-and-belongs-to-many
[11:41:52] sevenseacat: http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association
[12:13:56] crst: has joined #RubyOnRails
[12:15:55] crst: Hi, is that haml syntax right? #parameters{data: {bank_account_id: @bank_account.id}} in JS: $parameters.data("bank-account-id") I don't get the id... no idea why
[12:16:59] sevenseacat: yeah its right. how did you define $parameters in the JS?
[12:17:14] crst: var $parameters;
[12:17:54] crst: $parameters = $("#parameters");
[12:18:38] sevenseacat: so what does the generated HTML for the div look like?
[12:19:05] crst: <div data-bank-account-id='1' id='parameters'></div>
[12:19:31] crst: yeah, no idea what's going on...
[12:19:42] sevenseacat: do you have more than one #parameters on the page?
[12:20:26] crst: just exactly that for the moment: #parameters{data: {bank_account_id: @bank_account.id}}
[12:21:10] sevenseacat: yes, but do you have any other divs with that ID on the page?
[12:21:46] sevenseacat: can you check?
[12:22:01] crst: yeah, ih checked the source and it's unique
[12:22:29] sevenseacat: so in a JS debugger, what does $parameters evaluate to?
[12:22:38] quirkycoders: has joined #RubyOnRails
[12:23:09] crst: Uncaught ReferenceError: $parameters is not defined at <anonymous>:1:1
[12:23:35] sevenseacat: so you don't have that code?
[12:24:14] crst: The js is there, everything else works except the id from parameters
[12:24:41] sevenseacat: well if its not defined, then its not working I dont think
[12:25:23] crst: you mean the specific $parameters code?
[12:25:44] sevenseacat: thats where your problem is, no?
[12:26:31] sevenseacat: so is that code that defines $parameters not being run, or did you test it out of scope?
[12:29:50] crst: sevenseacat: oh yeah, it's out of scope somehow, thanks a lot for your help!
[12:42:58] irishfromua: has joined #RubyOnRails
[12:58:31] quirkycoders: has joined #RubyOnRails
[13:05:44] chouhoulis: has joined #RubyOnRails
[13:07:32] nratter: has joined #RubyOnRails
[13:10:14] irishfromua: has joined #RubyOnRails
[13:15:32] jphase: has joined #RubyOnRails
[13:21:20] irishfromua: has joined #RubyOnRails
[13:28:13] jphase: has joined #RubyOnRails
[13:30:01] shilon: has joined #RubyOnRails
[13:31:40] neohunter: has joined #RubyOnRails
[13:31:58] neohunter: I've this on a rails 5.0 application config.assets.paths << File.join(Rails.root, "/vendor/admin")
[13:32:15] neohunter: this file do exist: vendor/admin/pages/ico/60.png
[13:32:24] neohunter: I've this on my layout image_path('ico/60.png')
[13:32:33] neohunter: On 5.0 it works, the png is loaded
[13:32:40] neohunter: but on 5.1 I receive an erro saysing
[13:32:46] neohunter: The asset "ico/76.png" is not present in the asset pipeline
[13:33:10] neohunter: if i set the full path pages/ico/60.png it says that is not precompiled and ask me to add to the precompiled assets list
[13:33:18] neohunter: but on 5.0 I'm not doing that
[13:33:43] neohunter: I checked the lambda on railties.rb for files to be precompield and its exactly the same on both version
[13:33:51] neohunter: why is not working? I'm nto able to find anything on the changelog
[13:40:02] RahulT: has joined #RubyOnRails
[13:40:51] ocpysh: has joined #RubyOnRails
[13:41:44] crst: Is there something wrong with: render json: { errors: errors }, status 402
[13:42:49] crst: This is the whole file https://pastebin.com/aNdWUpQp
[13:43:59] sevenseacat: whats the problem?
[13:44:57] crst: syntax error, unexpected tINTEGER, expecting keyword_do or '{' or '('
[13:46:49] sevenseacat: right. what arguments does render take?
[13:48:45] conta: has joined #RubyOnRails
[13:52:30] crst: Is it render(file_name) ?
[13:54:44] crst: Or, it takes an array in this case ?
[13:55:42] beilabs: has joined #RubyOnRails
[13:56:17] sevenseacat: so check the syntax of what youre passing it
[13:57:51] tetraktys: has joined #RubyOnRails
[13:58:08] crst: the ", status 402" part needs to be removed, is it that?
[13:58:50] tetraktys: Hi all, I'm trying to implement dynamic custom 404/500 pages more or less following this post: https://mattbrictson.com/dynamic-rails-error-pages However: I want the pages to be different for the public and the admin part. How should i go about that?
[13:59:03] beilabs: has joined #RubyOnRails
[14:00:18] brent__: has joined #RubyOnRails
[14:04:14] crst: sevenseacat: I don't understand, this is the exact file a guy from a tutorial uses, and he does not get any error...
[14:04:38] sevenseacat: show me where youre getting it from
[14:06:06] crst: https://www.youtube.com/watch?v=saAKNtUg-44 There is not repo for this project, unfortunately. You can see the file at 1:06:00.
[14:06:45] sevenseacat: your code is not the same. compare them carefully.
[14:07:24] pawelbx: has joined #RubyOnRails
[14:07:59] crst: oh, man a colon.... you have fast eyes, mister
[14:08:55] crst: I compared at least 3 times before, lol
[14:09:14] sevenseacat: I am not a mister, but I do know that you're passing render a hash and your hash wasnt valid.
[14:09:35] bensarz: has joined #RubyOnRails
[14:10:18] chouhoulis: has joined #RubyOnRails
[14:10:57] crst: oh, thanks Miss!
[14:11:25] davic: has joined #RubyOnRails
[14:17:16] srinidhi: has joined #RubyOnRails
[14:23:31] jhfisc: has joined #RubyOnRails
[14:28:50] jhfisc: has joined #RubyOnRails
[14:30:27] beilabs: has joined #RubyOnRails
[14:37:06] quirkycoders: has joined #RubyOnRails
[14:37:09] shilon: sevenseacat: thanks, i did it :)
[14:41:42] RahulT: has joined #RubyOnRails
[14:43:17] funburn: has joined #RubyOnRails
[14:47:04] cam27: has joined #RubyOnRails
[14:51:27] srinidhi: has joined #RubyOnRails
[14:54:38] Shilon_: has joined #RubyOnRails
[14:55:57] tetraktys: What would currently be a best practice concerning error pages? I need different layouts depending on whether the error occurred in the public domain or in the admin section
[15:00:19] jhfisc: has joined #RubyOnRails
[15:11:01] jphase: has joined #RubyOnRails
[15:11:37] jhfisc: has joined #RubyOnRails
[15:21:19] jphase: has joined #RubyOnRails
[15:22:02] jhfisc: has joined #RubyOnRails
[15:24:09] jphase: has joined #RubyOnRails
[15:27:56] jhfisc: has joined #RubyOnRails
[15:33:13] jhfisc: has joined #RubyOnRails
[15:37:37] jhfisc: has joined #RubyOnRails
[15:39:21] jphase: has joined #RubyOnRails
[15:46:28] jhfisc: has joined #RubyOnRails
[15:47:14] lessless: has joined #RubyOnRails
[15:54:53] jhfisc: has joined #RubyOnRails
[15:57:24] KeyJoo: has joined #RubyOnRails
[16:00:55] jhfisc: has joined #RubyOnRails
[16:13:56] jhfisc: has joined #RubyOnRails
[16:16:37] ocpysh: has joined #RubyOnRails
[16:18:41] neohunter: has joined #RubyOnRails
[16:18:53] neohunter: It's possible to prefix all my links with the namespace
[16:18:56] neohunter: so i can stop doing
[16:19:02] neohunter: link_to [:admin, user]
[16:19:11] neohunter: and if i'm in that namespace i can do
[16:19:14] neohunter: link_to user
[16:22:19] Scient: how come my OpenStruct in ruby 2.3 doesnt have #json_create.... wtf
[16:22:24] Scient: its a stdlib method, is it not
[16:24:59] tetraktys: has joined #RubyOnRails
[16:26:43] Ryzokuken: has joined #RubyOnRails
[17:02:58] Or1on: has joined #RubyOnRails
[17:17:50] kies: has joined #RubyOnRails
[17:20:01] drptbl: has joined #RubyOnRails
[17:30:12] Aherin: has joined #RubyOnRails
[17:30:42] quirkycoders: has joined #RubyOnRails
[17:44:51] conta: has joined #RubyOnRails
[17:50:57] funburn: has joined #RubyOnRails
[17:53:46] funburn: has joined #RubyOnRails
[17:56:13] dviola: has joined #RubyOnRails
[17:57:51] funburn: has joined #RubyOnRails
[17:58:41] funburn: has joined #RubyOnRails
[18:01:13] universa1: has joined #RubyOnRails
[18:01:23] funburn: has joined #RubyOnRails
[18:04:16] funburn: has joined #RubyOnRails
[18:06:49] funburn: has joined #RubyOnRails
[18:08:58] Ryzokuken: has joined #RubyOnRails
[18:09:59] funburn: has joined #RubyOnRails
[18:12:32] funburn: has joined #RubyOnRails
[18:13:04] ryzokuken__: has joined #RubyOnRails
[18:17:02] funburn: has joined #RubyOnRails
[18:17:03] jhfisc: has joined #RubyOnRails
[18:17:42] fryguy: has joined #RubyOnRails
[18:19:46] funburn: has joined #RubyOnRails
[18:21:23] netzfisch: has joined #RubyOnRails
[18:22:19] funburn: has joined #RubyOnRails
[18:23:30] jhfisc: has joined #RubyOnRails
[18:24:51] funburn: has joined #RubyOnRails
[18:27:52] funburn: has joined #RubyOnRails
[18:30:24] funburn: has joined #RubyOnRails
[18:32:00] ryzokuken__: has joined #RubyOnRails
[18:32:21] Rodya_: has joined #RubyOnRails
[18:33:35] funburn: has joined #RubyOnRails
[18:36:08] funburn: has joined #RubyOnRails
[18:38:41] funburn: has joined #RubyOnRails
[18:39:30] funburn: has joined #RubyOnRails
[18:42:32] funburn: has joined #RubyOnRails
[18:45:15] funburn: has joined #RubyOnRails
[18:46:33] RahulT: has joined #RubyOnRails
[18:48:18] funburn: has joined #RubyOnRails
[18:50:06] quirkycoders: has joined #RubyOnRails
[18:51:05] funburn: has joined #RubyOnRails
[18:51:33] conta: has joined #RubyOnRails
[18:52:35] jhfisc: has joined #RubyOnRails
[18:53:38] funburn: has joined #RubyOnRails
[18:55:28] jhfisc: has joined #RubyOnRails
[18:55:36] funburn: has joined #RubyOnRails
[18:58:42] funburn: has joined #RubyOnRails
[19:00:38] jhfisc: has joined #RubyOnRails
[19:02:47] funburn: has joined #RubyOnRails
[19:05:20] funburn: has joined #RubyOnRails
[19:05:45] ocpysh: has joined #RubyOnRails
[19:06:53] jhfisc: has joined #RubyOnRails
[19:07:39] DrYockel: has joined #RubyOnRails
[19:08:02] funburn: has joined #RubyOnRails
[19:10:55] jhfisc: has joined #RubyOnRails
[19:10:56] funburn: has joined #RubyOnRails
[19:12:44] cam27: has joined #RubyOnRails
[19:13:59] funburn: has joined #RubyOnRails
[19:15:35] jhfisc: has joined #RubyOnRails
[19:16:32] funburn: has joined #RubyOnRails
[19:20:57] funburn: has joined #RubyOnRails
[19:22:13] francuz: has joined #RubyOnRails
[19:23:56] funburn: has joined #RubyOnRails
[19:26:54] jhfisc: has joined #RubyOnRails
[19:26:57] funburn: has joined #RubyOnRails
[19:30:01] funburn: has joined #RubyOnRails
[19:32:56] funburn: has joined #RubyOnRails
[19:34:49] jhfisc: has joined #RubyOnRails
[19:35:51] funburn: has joined #RubyOnRails
[19:40:18] funburn: has joined #RubyOnRails
[19:42:01] jhfisc: has joined #RubyOnRails
[19:42:36] Aherin: has joined #RubyOnRails
[19:42:56] jphase: has joined #RubyOnRails
[19:45:32] francuz_: has joined #RubyOnRails
[19:45:34] funburn: has joined #RubyOnRails
[19:45:46] jphase: has joined #RubyOnRails
[19:47:15] jhfisc: has joined #RubyOnRails
[19:47:41] jphase: has joined #RubyOnRails
[19:50:51] DrYockel: has joined #RubyOnRails
[19:51:01] jphase: has joined #RubyOnRails
[19:53:33] francuz_: Hi, here is an action that is called using AJAX to add a Session inside my Cart : https://pastebin.com/uKCK67DS . It works as intended, but sometimes (when the post request is duplicated), the same session is added twice to the Cart despite the verification. I think that what happens is that the verification for the second request is done before the adding of the first one. What is the best way to prevent that ? Also, if you
[19:53:34] francuz_: have any advice concerning the "cleanliness" of the code code, I'm still learning so don't hesitate. (knowing that I don't have acces to the front-end sadly).
[19:59:03] jhfisc: has joined #RubyOnRails
[20:03:02] ephemer0l: has joined #RubyOnRails
[20:12:04] jhfisc: has joined #RubyOnRails
[20:15:33] jhfisc: has joined #RubyOnRails
[20:19:02] beilabs: has joined #RubyOnRails
[20:23:36] FastJack: has joined #RubyOnRails
[20:26:28] tetraktys: has joined #RubyOnRails
[20:31:47] beilabs: has joined #RubyOnRails
[20:32:28] jhfisc: has joined #RubyOnRails
[20:36:29] aclark: has joined #RubyOnRails
[20:36:50] elcontrastador: has joined #RubyOnRails
[20:43:45] jhfisc: has joined #RubyOnRails
[20:53:56] Rodya_: has joined #RubyOnRails
[20:55:46] jhfisc: has joined #RubyOnRails
[21:09:42] alfiemax: has joined #RubyOnRails
[21:13:55] jhfisc: has joined #RubyOnRails
[21:23:05] marr: has joined #RubyOnRails
[21:25:53] jhfisc: has joined #RubyOnRails
[21:30:58] MasterAsia: francuz_, use a db uniqueness constraint
[21:31:06] MasterAsia: so duplicates arent allowed
[21:33:32] jhfisc: has joined #RubyOnRails
[21:42:30] DenSchub: has left #RubyOnRails: ("derailed.")
[21:51:36] high_fiver: has joined #RubyOnRails
[22:01:05] jhfisc: has joined #RubyOnRails
[22:06:54] jhfisc: has joined #RubyOnRails
[22:12:13] one_zero: has joined #RubyOnRails
[22:17:29] jhfisc: has joined #RubyOnRails
[22:19:43] beilabs: has joined #RubyOnRails
[22:23:38] jhfisc: has joined #RubyOnRails
[22:26:21] quirkycoders: has joined #RubyOnRails
[22:28:46] jphase: has joined #RubyOnRails
[22:29:43] jhfisc: has joined #RubyOnRails
[22:35:31] Rodya_: has joined #RubyOnRails
[22:37:39] jhfisc: has joined #RubyOnRails
[22:47:45] quirkycoders: has joined #RubyOnRails
[22:49:06] jhfisc: has joined #RubyOnRails
[22:58:10] jhfisc: has joined #RubyOnRails
[23:13:05] alfiemax: has joined #RubyOnRails
[23:24:17] ocpysh: has joined #RubyOnRails
[23:29:02] jhfisc: has joined #RubyOnRails
[23:44:57] K3rber0s: has joined #RubyOnRails
[23:58:42] ElCapitanMarklar: has joined #RubyOnRails