« Back to channel list

#RubyOnRails - 01 January 2018

« Back 1 day Forward 1 day »
[00:16:39] ephemer0l: has joined #RubyOnRails
[00:19:34] zwliew: has joined #RubyOnRails
[00:33:19] fragamus: has joined #RubyOnRails
[00:46:31] Exuma: has joined #RubyOnRails
[01:59:44] cschneid_: has joined #RubyOnRails
[02:13:13] mtkd: has joined #RubyOnRails
[02:20:48] LateralOctober: has joined #RubyOnRails
[02:22:16] dblessing: has joined #RubyOnRails
[02:49:28] fragamus: has joined #RubyOnRails
[03:11:24] wethu: has joined #RubyOnRails
[03:15:46] nso95: has joined #RubyOnRails
[03:37:31] jnollette: has joined #RubyOnRails
[03:38:35] orbyt_: has joined #RubyOnRails
[03:48:07] fragamus: has joined #RubyOnRails
[04:18:32] mtkd: has joined #RubyOnRails
[04:22:27] fragamus: has joined #RubyOnRails
[05:25:17] ur5us: has joined #RubyOnRails
[05:26:34] t0adst00l: has joined #RubyOnRails
[05:27:54] alfiemax: has joined #RubyOnRails
[05:28:06] alfiemax: Happy New Year everyone... :)
[05:45:52] wethu: has joined #RubyOnRails
[05:46:40] za1b1tsu: has joined #RubyOnRails
[05:47:26] za1b1tsu: Hello, Happy New Year everybody, much health and goodluck for you and your famillies!
[05:51:36] KeyJoo: has joined #RubyOnRails
[05:52:41] darkhanb: has joined #RubyOnRails
[06:09:46] wethu: has joined #RubyOnRails
[06:27:43] alfiemax: has joined #RubyOnRails
[06:33:14] srinidhi: has joined #RubyOnRails
[06:40:09] eljojo: has joined #RubyOnRails
[07:10:45] t0adst00l: has joined #RubyOnRails
[07:22:41] Exuma: has joined #RubyOnRails
[07:34:49] Nuck: has joined #RubyOnRails
[07:43:36] ur5us: has joined #RubyOnRails
[08:20:47] dionysus69: has joined #RubyOnRails
[08:47:12] mikecmpbll: has joined #RubyOnRails
[09:01:21] srinidhi: has joined #RubyOnRails
[09:02:09] mtkd: has joined #RubyOnRails
[09:02:16] cschneid_: has joined #RubyOnRails
[09:28:12] alfiemax: has joined #RubyOnRails
[09:35:27] marr: has joined #RubyOnRails
[09:42:22] mikecmpbll: has joined #RubyOnRails
[09:42:51] moei: has joined #RubyOnRails
[10:06:45] zwliew: has joined #RubyOnRails
[10:09:14] wethu: has joined #RubyOnRails
[10:09:40] ur5us: has joined #RubyOnRails
[10:19:25] gambl0re: has joined #RubyOnRails
[10:35:38] ur5us: has joined #RubyOnRails
[10:51:12] za1b1tsu: has joined #RubyOnRails
[10:52:01] za1b1tsu: can someone tell me what does "filter = {}" do? Ex most_recent_upvoted(filter = {})
[11:04:51] AzaToth: has joined #RubyOnRails
[11:05:59] Barrt: has joined #RubyOnRails
[11:18:41] cschneid_: has joined #RubyOnRails
[11:21:54] alfiemax: has joined #RubyOnRails
[11:26:22] arBmind: has joined #RubyOnRails
[11:43:36] iamarun: has joined #RubyOnRails
[11:48:29] fugee: has joined #RubyOnRails
[11:48:44] fugee: has anyone here worked with publify
[11:55:02] cschneid_: has joined #RubyOnRails
[12:01:46] sagax: has joined #RubyOnRails
[12:01:47] uks: has joined #RubyOnRails
[12:06:55] helpa: has joined #RubyOnRails
[12:07:20] helpa: has joined #RubyOnRails
[12:07:40] helpa: has joined #RubyOnRails
[12:21:26] sameerynho: has joined #RubyOnRails
[12:32:20] cschneid_: has joined #RubyOnRails
[13:10:25] cschneid_: has joined #RubyOnRails
[13:22:45] Tempesta: has joined #RubyOnRails
[13:25:34] alfiemax_: has joined #RubyOnRails
[13:28:53] armyriad: has joined #RubyOnRails
[13:29:41] ahrs: has joined #RubyOnRails
[14:28:00] cschneid_: has joined #RubyOnRails
[14:29:44] kapil___: has joined #RubyOnRails
[15:02:33] dionysus69: has joined #RubyOnRails
[15:14:30] srinidhi: has joined #RubyOnRails
[15:19:22] j0llyr0tten: has joined #RubyOnRails
[15:20:31] j0llyr0tten: hey, i tried removing the coffeescript gem from my Gemfile to disable coffeescript but Rails complains, any ideas
[15:28:45] apeiros: J0llyr0tten: you'll almost certainly get better answers if you elaborate the "complains"
[15:29:44] apeiros: suggestions regarding examples/frameworks with nicely styled forms for mobile devices (mainly phones)?
[15:29:50] j0llyr0tten: apeiros: throws an exception `cannot load such file -- coffee_script' from gems/sprockets-3.7.1/lib/sprockets/autoload/coffee_script.rb
[15:30:35] j0llyr0tten: I don't know why sprockets is still trying to autoload coffeescript when i don't even have the gem installed and all javascript files end in .js
[15:30:42] apeiros: J0llyr0tten: fun. I don't remember sprockets complaining like that. maybe you still have something which actually either is .coffee or uses coffee?
[15:32:02] j0llyr0tten: Could it be ActionView and ActionCable ?
[15:33:39] apeiros: unlikely. they'd declare it as a dependency.
[15:36:43] cschneid_: has joined #RubyOnRails
[15:39:10] j0llyr0tten: the error occurs in <%= stylesheet_link_tag 'application', media: 'all' %>
[15:39:51] j0llyr0tten: which is weird because it that's for CSS, correct?
[15:45:14] Penguinlay: has joined #RubyOnRails
[15:46:31] apeiros: yupp, that's for css
[15:47:15] ProofTechnique: has joined #RubyOnRails
[15:53:17] mtkd: has joined #RubyOnRails
[16:16:29] cschneid_: has joined #RubyOnRails
[16:41:18] orbyt_: has joined #RubyOnRails
[16:54:50] Barrt: has joined #RubyOnRails
[16:55:10] cschneid_: has joined #RubyOnRails
[17:08:51] rfoust: has joined #RubyOnRails
[17:12:34] NoGodDamnIdea: has joined #RubyOnRails
[17:13:19] srinidhi: has joined #RubyOnRails
[17:15:46] ur5us: has joined #RubyOnRails
[17:25:53] alfiemax: has joined #RubyOnRails
[17:27:50] j0llyr0tten: I tried it with a fresh install and I'm still getting an error … Rails version: 5.2.0.beta2 , Ruby version: 2.5.0 (x86_64-linux)
[17:36:08] mtkd: has joined #RubyOnRails
[17:51:50] alfiemax: has joined #RubyOnRails
[17:54:21] ur5us: has joined #RubyOnRails
[18:07:33] cschneid_: has joined #RubyOnRails
[18:37:22] mtkd: has joined #RubyOnRails
[18:39:21] alfiemax: has joined #RubyOnRails
[18:46:11] cschneid_: has joined #RubyOnRails
[18:55:37] dionysus69: has joined #RubyOnRails
[18:59:20] alfiemax: has joined #RubyOnRails
[19:09:55] cschneid_: has joined #RubyOnRails
[19:17:32] gambl0re: has joined #RubyOnRails
[19:46:06] sameerynho: has joined #RubyOnRails
[19:49:29] unreal: has joined #RubyOnRails
[19:57:20] alfiemax: has joined #RubyOnRails
[20:07:39] Dimik: has joined #RubyOnRails
[20:15:43] cschneid_: has joined #RubyOnRails
[20:34:45] zave: has joined #RubyOnRails
[20:37:44] dviola: has joined #RubyOnRails
[20:40:05] arBmind: has joined #RubyOnRails
[20:40:37] noocx: has joined #RubyOnRails
[20:48:15] t0adst00l: has joined #RubyOnRails
[20:57:40] cschneid_: has joined #RubyOnRails
[20:59:13] amperry: has joined #RubyOnRails
[21:16:56] Radar: GOOD MRONING
[21:17:05] Radar: MORNING ALSO (gee I am bad at typing)
[21:23:49] Radar: amperry: Your money from the other day went towards buying a gift for my niece: htmlandcssbook.com. So thanks :D
[21:25:07] amperry: Radar: glad to hear it.
[21:30:16] cschneid_: has joined #RubyOnRails
[21:31:25] sameerynho: has joined #RubyOnRails
[21:43:48] _aeris_: has joined #RubyOnRails
[21:48:11] alfiemax: has joined #RubyOnRails
[21:56:23] _aeris_: has joined #RubyOnRails
[21:56:34] zrl: has joined #RubyOnRails
[21:56:40] creature: has joined #RubyOnRails
[21:57:04] zrl: Hi friends, is there a way to make a has_many association read only?
[21:57:18] zrl: I know I can make models read only, but I'm still able to modify their associations after calling readonly!.
[21:59:41] dviola: has joined #RubyOnRails
[22:00:53] _aeris_: has joined #RubyOnRails
[22:01:31] jnollette: has joined #RubyOnRails
[22:07:33] creature: has joined #RubyOnRails
[22:09:39] orbyt_: has joined #RubyOnRails
[22:10:15] Seich: has joined #RubyOnRails
[22:11:56] cschneid_: has joined #RubyOnRails
[22:14:10] kapil___: has joined #RubyOnRails
[22:15:50] alfiemax: has joined #RubyOnRails
[22:16:04] quazimodo: has joined #RubyOnRails
[22:25:50] _aeris_: has joined #RubyOnRails
[22:30:05] Exuma: has joined #RubyOnRails
[22:41:12] noocx: has joined #RubyOnRails
[22:43:35] LiamW: has joined #RubyOnRails
[22:44:01] LiamW: I'm trying to rescue_from ActionController::UnknownFormat but rails isn't rescuing it, why not?
[22:44:07] LiamW: (rails 5.1.4 on ruby 2.5)
[22:45:47] LiamW: ah damnit never mind
[22:45:50] LiamW: I had an error in my rescue_from block
[22:49:51] darkhanb: has joined #RubyOnRails
[22:50:24] noocx: can you tell me why I get the undefined method error? https://gist.github.com/noocx/65bb36361e784d2795e1a5fa65d3015d
[22:51:52] alfiemax: has joined #RubyOnRails
[22:57:43] LiamW: has left #RubyOnRails: ("WeeChat 1.8")
[22:58:02] Radar: a method is probably undefined
[22:58:19] Radar: oh ruby[bot] has gone on vacat ion
[22:58:24] Radar: noocx: please ask rails questions in the Rails channel
[22:58:27] Radar: noocx: #rubyonraqils
[22:58:29] Radar: noocx: #rubyonrails*
[23:00:45] noocx: Radar: this isnt that channel?:)
[23:00:58] Radar: Whoops...
[23:01:11] Radar: Can you tell it's my first day back at work for the year?
[23:01:16] Radar: noocx: What version of Rails are you on?
[23:01:25] kapil___: i have A has Many B. and B has many C. when I fetch A. I only get B. but i am not able to fetch C from B.
[23:01:54] noocx: contains the form_with right?
[23:04:10] kapil___: when I only fetch B and then fetch C it successfully gives it.
[23:04:13] Radar: noocx: form_with I think is more recent than that. I think it's only in 5.2.
[23:04:48] noocx: Radar: no, it worked in 5.0.6 in 5.2 there are just some refinements right?
[23:04:56] my123: has joined #RubyOnRails
[23:05:00] Radar: undefined method `form_with' for #<#<Class:0x0000561bb6d15e70>:0x0000561bb6e88230>
[23:05:03] noocx: but double checking
[23:05:09] Radar: noocx: Seems to me like it's distinctly NOT working in 5.0.6.
[23:05:14] Radar: https://m.patrikonrails.com/rails-5-1s-form-with-vs-old-form-helpers-3a5f72a8c78a
[23:05:19] Radar: According to this, it was introduced in 5.1.
[23:05:43] noocx: yes, but i started with 5.0.6 and tried the form_with with the guide
[23:05:53] noocx: but checking again
[23:06:03] noocx: but I think my issue will be about the new methid
[23:06:04] Radar: noocx: 5.0.6 is a version that was released BEFORE 5.1.
[23:06:12] Radar: so 5.0.6 does not have 5.1's new form_with method.
[23:07:16] noocx: Radar: it came with 5.1?
[23:07:34] Radar: noocx: I'm pretty sure I've said that at least 3 times.
[23:08:26] noocx: ok sorry, checked and my tested version was 5.1.4
[23:09:19] noocx: so I was wrong with 5.0.6, but now I try to use it on 5.0.6, so thats the problem
[23:19:05] kapil___: hello how to upgrade rails 5.2 beta?
[23:19:53] Radar: kapil___: change the version in your gemfile and run `bundle update rails`
[23:20:07] kapil___: Radar: thanks
[23:23:48] alfiemax: has joined #RubyOnRails
[23:36:45] hnanon: has joined #RubyOnRails
[23:39:05] hnanon: I have a Card model that belongs to Account.
[23:39:32] hnanon: I create the Card when creating a Subscription.
[23:39:48] hnanon: I want to merge the account in the params.
[23:39:53] hnanon: I'm doing something like:
[23:40:04] hnanon: params.require(:subscription).permit(:category_id, :market_id, cards_attributes: [:name]).deep_merge(cards_attributes: [account_id: @account.id])
[23:40:35] hnanon: This gives me the error: undefined method `deep_merge' for #<ActionController::Parameters:0x007f37e6cd8190>
[23:41:00] mtkd: has joined #RubyOnRails
[23:41:01] hnanon: When I just use "merge", the account is merged in the params but the name is not.
[23:41:18] hnanon: It's as if the cards_attributes is being overwritten.
[23:42:07] hnanon: How can I merge the account in the cards_attributes params while maintaining the existing params?
[23:43:26] hnanon: params look like this:
[23:43:27] Radar: hnanon: Why not set the account relationship after the object is created?
[23:43:37] hnanon: subscription"=>{"market_id"=>"5", "cards_attributes"=>{"0"=>{"name"=>"Name Here"}}
[23:44:07] hnanon: Radar: Yes, I was going to do that. But I wasn't sure if merging in the params would be better.
[23:44:21] Radar: hnanon: I think it's better to do it afterwards
[23:46:20] hnanon: Radar: In a before save?
[23:47:41] Radar: hnanon: in the controller
[23:51:01] hnanon: Radar: Ok. I Just did @subscription.cards.first.account = @account
[23:51:01] cschneid_: has joined #RubyOnRails
[23:51:09] hnanon: ...and it's working fine now.
[23:51:11] Radar: seems fine to me. You'll have to save it.
[23:51:17] hnanon: Thank you.
[23:51:33] Radar: Better to do it only in the controller because in the model it will be a callback that will run ALWAYS, including in your tests where you probably don't need it.
[23:51:45] Radar: And by having it in the Card model it really ties your Card and Account models togetrher.
[23:53:22] hnanon: I placed that line above before saving the subscription. There was no need to explictly save the card.
[23:55:25] hnanon: Thanks, as always.