« Back to channel list

#RubyOnRails - 25 October 2018

« Back 1 day Forward 1 day »
[00:02:56] mangold: has joined #RubyOnRails
[00:26:59] ur5us: has joined #RubyOnRails
[00:33:55] orbyt_: has joined #RubyOnRails
[00:49:20] mangold: has joined #RubyOnRails
[00:52:03] zorp_: has joined #RubyOnRails
[01:04:46] tdy: has joined #RubyOnRails
[01:26:21] kurko_: has joined #RubyOnRails
[02:04:55] agent_white: has joined #RubyOnRails
[02:06:57] Saukk: has joined #RubyOnRails
[02:10:20] darkhanb: has joined #RubyOnRails
[02:21:16] kurko_: has joined #RubyOnRails
[02:34:54] jgpawletko: has joined #RubyOnRails
[02:35:15] truenito: has joined #RubyOnRails
[02:42:06] ariedler: has joined #RubyOnRails
[02:51:37] maryo: has joined #RubyOnRails
[03:05:37] Radar: orbyt_: did you have some code that shows how redis is exposed?
[03:06:25] orbyt_: It was a private function is ApplicationController. I was able to get access to it in my test via `controller.send`, though it feels a bit hacky.
[03:06:37] orbyt_: I'm not looking at the code atm though
[03:07:05] xall: has joined #RubyOnRails
[03:09:47] braincrash: has joined #RubyOnRails
[03:12:42] dnewkerk: has joined #RubyOnRails
[03:15:45] wojnar: has joined #RubyOnRails
[03:31:57] skwurl: has joined #RubyOnRails
[03:33:21] skwurl: im getting a bunch of random these " #<Note:0x00007fdb4151a1e8> " on my view instead of the string im expecting. how can i convert this .to_s ?
[03:39:28] Milos: has joined #RubyOnRails
[04:05:41] Jervis_: has joined #RubyOnRails
[04:24:46] skwurl: anyone here?
[04:24:50] eckhardt: has joined #RubyOnRails
[04:30:23] reber: has joined #RubyOnRails
[04:33:11] Xiti`: has joined #RubyOnRails
[04:47:10] skwurl: is nobody on this channel?
[04:48:24] Robdgreat: 183 nicks by my counting. I have no idea what a Note is to advise how to handle it
[04:50:00] skwurl: ahh... thank you i was worried for a moment. to rephrase the question....
[04:50:48] Robdgreat: people tend to idle on irc. Sometimes channels are active, other times they're dead. It's something of an asychronous medium sometimes
[04:51:13] Robdgreat: what is this Note object meant to be?
[04:51:14] skwurl: im getting activerecord::relation instead of expected string
[04:51:49] skwurl: i appreciate your response either way. ty
[04:52:37] Radar: skwurl: !rule0
[04:52:37] helpa: skwurl: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[04:52:55] skwurl: working on a codeshare now...
[04:53:03] Radar: ping me when it's up
[04:53:11] Robdgreat: cheers Radar
[04:53:29] skwurl: https://codeshare.io/5eYmyl
[04:54:22] skwurl: ive confirmed in the dbconsole that my data is being stored
[04:56:31] skwurl: #<Note::ActiveRecord_Relation:0x000055c31be11ac0> is what im getting in my view
[04:59:05] Robdgreat: skwurl: try what I just put on line 12
[05:00:16] skwurl: .to_a is .to_array right ?
[05:02:50] skwurl: not quite now it puts out the whole dbentry
[05:03:07] Robdgreat: well, you were asking for all
[05:04:37] skwurl: right im playing with this now.
[05:08:40] skwurl: #<Note id: 611, note: "{apple}", created_at: "2018-10-25 05:07:57",
[05:09:12] skwurl: a list of them. trying to call @notes = Note.note is not working
[05:09:33] skwurl: line 12 @put_notes
[05:10:50] Robdgreat: https://stackoverflow.com/questions/12463254/iterating-through-an-activerecordrelation-array I think this is the pattern you want
[05:13:18] tbuehlmann: skwurl: I suggest you run `rails generate scaffold Project name:string` in your terminal, followed by `rails db:migrate` and then inspect app/controllers/projects_controller.rb and the corresponding views in app/views/projects
[05:13:18] skwurl: .pluck is getting closer
[05:13:38] tbuehlmann: there's an ordinary code flow visible in all the controller actions
[05:13:58] za1b1tsu: has joined #RubyOnRails
[05:14:00] Robdgreat: DarkainMX: tbuehlmann I haven't touched Rails in the better part of a decade. I'm glad I'm not the only one trying to give aid :)
[05:15:13] skwurl: right im familair as i want to be with genrate scaffold at the moment. trying to do it from scratch.
[05:15:15] NpcOrangeManBad: has joined #RubyOnRails
[05:17:12] MoritaShinobu: has joined #RubyOnRails
[05:32:30] hd1: has joined #RubyOnRails
[05:38:49] tbuehlmann: skwurl: any question in particular?
[06:06:18] beholders_eye: has joined #RubyOnRails
[06:12:50] za1b1tsu: has joined #RubyOnRails
[06:22:21] tdy: has joined #RubyOnRails
[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:39:22] crankharder: has joined #RubyOnRails
[06:47:55] mangold: has joined #RubyOnRails
[06:52:17] Psy-Q: which is inconvenient when you put the thing behind e.g. Passenger under multiple ServerAliases
[07:02:25] SteenJobs: has joined #RubyOnRails
[07:09:27] tuor: has joined #RubyOnRails
[07:13:07] srinidhi: has joined #RubyOnRails
[07:14:01] voolik: has joined #RubyOnRails
[07:23:25] LambdaSource: has joined #RubyOnRails
[07:26:24] sandstrom: has joined #RubyOnRails
[07:44:14] hd1: has left #RubyOnRails: ()
[07:47:18] blackmesa: has joined #RubyOnRails
[08:04:30] ur5us: has joined #RubyOnRails
[08:28:04] Caerus: has joined #RubyOnRails
[08:34:44] mangold: has joined #RubyOnRails
[08:41:04] lunarkitty7: has joined #RubyOnRails
[08:41:17] srinidhi: has joined #RubyOnRails
[08:43:18] MoritaShinobu: has joined #RubyOnRails
[08:52:47] wethu: has joined #RubyOnRails
[08:57:59] Ergo: has joined #RubyOnRails
[08:58:11] blackmesa: has joined #RubyOnRails
[09:03:16] lexileo: has joined #RubyOnRails
[09:24:51] zorp_: has joined #RubyOnRails
[09:25:39] voolik: has joined #RubyOnRails
[09:40:36] tuor: has joined #RubyOnRails
[09:43:56] s2013: has joined #RubyOnRails
[10:04:31] roshanavand: has joined #RubyOnRails
[10:20:18] blackcross: has joined #RubyOnRails
[10:39:29] whysthatso: has joined #RubyOnRails
[10:48:22] roshanavand: has joined #RubyOnRails
[10:51:00] kurko_: has joined #RubyOnRails
[10:56:57] kapil____: has joined #RubyOnRails
[11:01:21] mikecmpbll: has joined #RubyOnRails
[11:03:22] lankanmon: has joined #RubyOnRails
[11:08:27] kazcandra: has joined #RubyOnRails
[11:32:24] wojnar: has joined #RubyOnRails
[11:39:42] crankharder: has joined #RubyOnRails
[12:01:15] ldnunes: has joined #RubyOnRails
[12:10:48] Ergo: has joined #RubyOnRails
[12:16:38] nexraf1_: has joined #RubyOnRails
[12:16:45] mostlybadfly: has joined #RubyOnRails
[12:37:17] nexraf1: has joined #RubyOnRails
[12:59:04] blackmesa: has joined #RubyOnRails
[13:19:39] dnewkerk: has joined #RubyOnRails
[13:27:22] tdy: has joined #RubyOnRails
[13:30:21] apparition: has joined #RubyOnRails
[13:37:37] kgutteridge: has joined #RubyOnRails
[13:38:30] lexileo: has joined #RubyOnRails
[14:13:39] ss942: has joined #RubyOnRails
[14:17:23] GodFather: has joined #RubyOnRails
[14:18:53] GodFather: has joined #RubyOnRails
[14:23:02] wojnar: has joined #RubyOnRails
[14:30:10] SteenJobs: has joined #RubyOnRails
[14:41:47] zorp_: has joined #RubyOnRails
[14:43:35] orbyt_: has joined #RubyOnRails
[14:55:55] droctothorpe: has joined #RubyOnRails
[14:56:21] droctothorpe: Anyone here? I have a quick question that pertains to gems and the C compiler.
[15:07:30] jhass: just ask your question and stick around for a couple of hours, if anybody can answer they will ;)
[15:13:58] apeiros_: has joined #RubyOnRails
[15:25:23] droctothorpe: Thanks! I received good helpful answers from the Rails Slack channel. Cheers!
[15:27:10] Dbugger: has joined #RubyOnRails
[15:28:16] dblessing: has joined #RubyOnRails
[15:29:49] Andr3as: has joined #RubyOnRails
[15:31:13] Andr3as: hello all.. i have a little issue with an "after_create".. i need to create associations (has_many through) when i create a certain element.. thats working great.. now i started to implement paper_trail to have an undo function
[15:31:51] Andr3as: i was able to get it working with associations too.. though that after_create is a bit wrong in that case as the associations will be recreated by paper_trail
[15:32:23] Andr3as: how would you guys prevent the firing of that after_create in that case?
[15:33:09] Andr3as: determining the "caller"? (e.g. which controller called for the (re)creation of that element?)
[15:39:25] beowuff: has joined #RubyOnRails
[15:40:50] tdy: has joined #RubyOnRails
[15:44:01] eckhardt: has joined #RubyOnRails
[16:03:54] eddof13: has joined #RubyOnRails
[16:03:59] conta: has joined #RubyOnRails
[16:07:15] Skull0Inc: has joined #RubyOnRails
[16:07:59] TvL2386: hi all! I've been reading about getting metrics out of a rails application and been reading this post: https://www.robustperception.io/instrumenting-a-ruby-on-rails-application-with-prometheus
[16:08:15] TvL2386: seems very interesting to export metrics to be collected by prometheus.
[16:08:26] TvL2386: However I don't know how to protect this /metrics endpoint
[16:09:28] kapil____: has joined #RubyOnRails
[16:10:02] TvL2386: I was thinking I want to add basic authentication to /metrics
[16:10:06] TvL2386: no idea how though
[16:10:19] TvL2386: can someone point me in the right direction?
[16:13:34] conta: has joined #RubyOnRails
[16:15:13] tdy: has joined #RubyOnRails
[16:16:01] kurko_: has joined #RubyOnRails
[16:18:32] lexileo: has joined #RubyOnRails
[16:26:07] CGibsonmm: has joined #RubyOnRails
[16:27:24] Voxxit: has joined #RubyOnRails
[16:32:02] CGibsonmm: I have a question about building a forum, i have a subjects model, a thread model, and a posts model. I want to keep my subjects and thread separate from each other/ resources nested, but I want to only create a new thread after routing through a certain subject, the thread model belongs_to a subject and a subject has many threads, but i do not want their resources nested, how can i link through subjects-> to thr
[16:32:02] CGibsonmm: ead and keep that subject id to submit to thread model?
[16:34:52] orbyt_: has joined #RubyOnRails
[16:37:01] darkhanb: has joined #RubyOnRails
[16:39:19] CGibsonmm: basically i still need a full index of every thread, but the need a subject
[17:15:10] Skull0Inc: Just sharing another resource: https://thoughtbot.com/upcase/practice they recently release all content for free learning instead of subscription based.
[17:39:14] srinidhi: has joined #RubyOnRails
[17:40:06] defsdoor: has joined #RubyOnRails
[17:54:52] ivanskie: has joined #RubyOnRails
[17:57:51] chouhoulis: has joined #RubyOnRails
[18:06:15] Inside: has joined #RubyOnRails
[18:22:02] jacobherrington: has joined #RubyOnRails
[18:28:34] eckhardt: has joined #RubyOnRails
[18:29:20] sandstrom: has joined #RubyOnRails
[18:30:24] blackmesa1: has joined #RubyOnRails
[18:39:43] comjf: has joined #RubyOnRails
[18:40:37] comjf: Howdy! I have an issue with initializers trying to read secrets that I define in my environmets/production.rb -- is there any way for me to tell rails to first load that file bfore anything in the initializers folder?
[18:41:41] comjf: Specifically ```config.secret_key = Rails.application.config.secret_key_base``` yet it fails because application.config isn't loaded yet (apparently)
[18:42:46] nate-^: has joined #RubyOnRails
[18:43:04] jacobherrington: has joined #RubyOnRails
[18:43:07] nate-^: is there a way with will_paginate to get the page number of an item from the list?
[18:43:46] nate-^: so, specfically lookup a item by id to find out what page it is?
[18:44:48] OrangeManBad: has joined #RubyOnRails
[18:45:41] NpcOrangeManBad: has joined #RubyOnRails
[18:45:54] kurko_: has joined #RubyOnRails
[18:55:20] orbyt_: has joined #RubyOnRails
[19:07:16] Terens: has joined #RubyOnRails
[19:07:34] Terens: I use sanitize method but it is too slow and brings down whole server
[19:07:36] Terens: any ideas?
[19:18:43] wojnar: has joined #RubyOnRails
[19:33:15] orbyt_: has joined #RubyOnRails
[19:37:11] OrangeManBad: has joined #RubyOnRails
[19:42:36] eddof13: has joined #RubyOnRails
[19:44:11] Tempesta: has joined #RubyOnRails
[19:47:37] orbyt_: If I do gem list my_gem in my rails app directory, I see 2 versions listed under "Local gems". If I then run `bundle show`, only 1 version is displayed for the gem in question
[19:47:48] orbyt_: What's the difference here?
[19:55:50] TvL2386: orbyt_: running `gem list my_gem` will just print what gems are installed on your local machine. Has nothing to do with the fact that you are running that in your rails app dir
[19:56:10] TvL2386: orbyt_: `bundle show my_gem` will print the version of that gem that is used in your rails app
[19:57:57] samort7: has joined #RubyOnRails
[19:59:32] apeiros: has joined #RubyOnRails
[20:01:34] samort7: Can anyone tell me why my schema doesn't contain the values from my migrations, even after doing rails db:reset?
[20:01:44] samort7: migration: https://github.com/tliss/battlefield-one/blob/kit-models/db/migrate/20181025180009_create_kit_lists.rb
[20:01:54] samort7: schema: https://github.com/tliss/battlefield-one/blob/kit-models/db/schema.rb
[20:02:12] samort7: The string "origin_user" doesn't appear in my schema and I'm not sure why
[20:12:19] knight33: has joined #RubyOnRails
[20:24:27] samort7: huh. I had to run rake db:rollback a bunch of times to fix it. Weird
[20:25:34] nate-^: has joined #RubyOnRails
[20:26:29] ur5us: has joined #RubyOnRails
[21:01:41] eckhardt: has joined #RubyOnRails
[21:27:27] orbyt_: has joined #RubyOnRails
[22:04:39] wethu: has joined #RubyOnRails
[22:09:39] kurko_: has joined #RubyOnRails
[22:13:53] hd1: has joined #RubyOnRails
[22:17:57] eddof13: has joined #RubyOnRails
[22:18:02] mochiyoda: has joined #RubyOnRails
[22:19:32] Dimik: has joined #RubyOnRails
[22:24:53] orbyt_: has joined #RubyOnRails
[22:33:01] ellcs: has joined #RubyOnRails
[22:45:51] eckhardt: has joined #RubyOnRails
[23:03:50] knight33: has joined #RubyOnRails
[23:17:53] nate-^: has joined #RubyOnRails
[23:18:53] tdy: has joined #RubyOnRails
[23:20:56] knight33: has joined #RubyOnRails
[23:32:35] lexileo: has joined #RubyOnRails
[23:55:44] dous: has joined #RubyOnRails