« Back to channel list

#RubyOnRails - 03 October 2017

« Back 1 day Forward 1 day »
[00:01:12] jrabe: has joined #RubyOnRails
[00:05:54] habs: has joined #RubyOnRails
[00:08:07] jhfisc: has joined #RubyOnRails
[00:10:27] pwnd_nsfw: People who write projects like autumn are ass holes and kind of cool at the same time...
[00:10:45] pwnd_nsfw: Makes learning the project interesting, but annoying at the beginning because you have to learn all of these metaphors first lol
[00:11:52] fragamus: has joined #RubyOnRails
[00:12:31] jhfisc: has joined #RubyOnRails
[00:17:29] mtkd: has joined #RubyOnRails
[00:18:10] jhfisc: has joined #RubyOnRails
[00:28:05] jhfisc: has joined #RubyOnRails
[00:36:30] jhfisc: has joined #RubyOnRails
[00:50:56] rubio: has joined #RubyOnRails
[00:52:28] rubio: Sorry to repeat my question but i was disconnected.... i need to "disable" the bundling feature of sprockets, (for js). I have set debug mode so i get every file separate in production like in development mode, but the sprockets is still bundling the JS anyway even if i don't use it. Can someone point me in the right direction?
[00:57:43] fragamus: has joined #RubyOnRails
[01:00:24] Radar: [10:28:59] <pwnd_nsfw> sleep's argument is in seconds and not ms? <- yes in Rubyland it's in seconds.
[01:00:31] Radar: If you want ms you could do sleep(0.05)
[01:01:39] pwnd_nsfw: Interesting
[01:01:53] pwnd_nsfw: I wish I knew more about structuring this project, but HORRAY FOR LEARNING EXPERIENCES
[01:01:57] pwnd_nsfw: This is going to be a disaster haha
[01:02:56] pwnd_nsfw: gonna use cinch, sorry Radar
[01:03:07] Radar: All is forgiving
[01:03:10] Radar: forgiven*
[01:04:07] pwnd_nsfw: I hope you're not doing the moneysqueeze with an evil laugh, thinking to yourself that I'll regret it and everything will fall through. And that eventually I'll come crawling back
[01:05:26] pwnd_nsfw: http://i0.kym-cdn.com/entries/icons/facebook/000/007/617/jew_basic.jpg actual sketch of Radar
[01:05:42] Radar: Radar kicked pwnd_nsfw: behavior is not conducive to the desired environment.
[01:05:57] pwnd_nsfw: has joined #RubyOnRails
[01:06:08] Radar: https://giphy.com/search/thats-racist
[01:06:16] pwnd_nsfw: Well, not inherently
[01:06:24] pwnd_nsfw: But I can understand how you'd see that
[01:06:51] pwnd_nsfw: it's literally the only image I could come up with without taking a picture of myself doing it
[01:07:16] rubio: has joined #RubyOnRails
[01:10:17] pwnd_nsfw: rubio, just disable spring lol
[01:10:24] pwnd_nsfw: ACTION shrugs
[01:12:16] rubio: i talking about production environment :)
[01:12:38] pwnd_nsfw: #gem spring
[01:13:04] pwnd_nsfw: I dont' know what I'm talking about. Don't listen to me
[01:13:37] rubio: no proble pwnd_nsfw
[01:32:58] rubio: has joined #RubyOnRails
[01:38:53] w0rd-driven: has joined #RubyOnRails
[01:39:08] TheRealMattM: has joined #RubyOnRails
[01:45:07] fugee: has joined #RubyOnRails
[01:46:16] fugee: anyone can discuss the sitepoint mailboxer example with me
[01:51:28] gusrub: has joined #RubyOnRails
[02:14:28] kapil___: has joined #RubyOnRails
[02:18:13] bronson: has joined #RubyOnRails
[02:21:28] orbyt_: has joined #RubyOnRails
[02:21:56] pwnd_nsfw: I feel I should go through one of my ruby books before I try actually working with just ruby. Definitely missing the comforts that rails provides heh.
[02:22:40] pwnd_nsfw: Yeah, I'm gonna do that. I feel a bit over my head
[02:31:26] wethu: has joined #RubyOnRails
[02:31:45] rrichardsr3: has joined #RubyOnRails
[02:40:07] jhfisc: has joined #RubyOnRails
[03:08:15] jhfisc: has joined #RubyOnRails
[03:08:16] irishfromua: has joined #RubyOnRails
[03:14:15] jhfisc: has joined #RubyOnRails
[03:17:05] jhfisc: has joined #RubyOnRails
[03:18:17] bronson: has joined #RubyOnRails
[03:48:03] kies: has joined #RubyOnRails
[03:50:06] jhfisc: has joined #RubyOnRails
[03:50:25] moei: has joined #RubyOnRails
[03:52:33] rrichardsr3: has joined #RubyOnRails
[03:54:45] jhfisc: has joined #RubyOnRails
[03:55:37] harrycs: has joined #RubyOnRails
[03:58:46] harrycs: hi all, relative noob here.. i'm trying to set up a rails app involving video upload via s3 - my initial thought was using carrierwave, but can i use that out of the box or are there more steps to adding video upload? i've tried googling but strangely I can't find much
[04:00:03] srinidhi: has joined #RubyOnRails
[04:01:59] havenwood: harrycs: It might be worth taking a look at Active Storage. It wont be released with Rails until Rails 5.2 is out, but it works now with Rails 5.1.
[04:02:06] havenwood: harrycs: https://github.com/rails/rails/tree/master/activestorage#active-storage
[04:18:29] harrycs: havenwood: oh wow, that does look like it would solve a lot of issues. do you think carrierwave is necessary at all then?
[04:18:47] harrycs: havenwood: thanks so much, I really appreciate the response and patience with my dumb questions
[04:20:13] havenwood: harrycs: yeah, you don't need carrierwave - they even have all the js taken care of
[04:20:33] havenwood: for selecting a file to upload, if you need that
[04:22:11] havenwood: harrycs: I've seen a nice use of Active Storage with S3 in a Rails 5.1 app. I'd recommend it.
[04:23:33] uks: has joined #RubyOnRails
[04:24:43] havenwood: I'll ask whathappens if she'll write a blog post, since she I know she uses Active Storage and is happy with it.
[04:26:03] harrycs: havenwood: do you remember what project that was? i'd love to take a look - i really am new and reading some more code before i try implementing would probably be good for me
[04:27:44] havenwood: harrycs: Sadly it's not open source. It's closed source code for a non-profit. I'm sure she'd be happy to answer questions.
[04:28:05] harrycs: havenwood: ahh sweet, well thanks for the suggestion for activestorage! really appreciate it
[04:28:24] havenwood: harrycs: you're welcome
[04:31:31] danguita: has joined #RubyOnRails
[04:35:39] clouder`grr: has joined #RubyOnRails
[04:56:50] fragamus: has joined #RubyOnRails
[05:00:54] tanuki: has joined #RubyOnRails
[05:01:31] cpruitt: has joined #RubyOnRails
[05:16:27] Chernobuk: has joined #RubyOnRails
[05:17:54] alfiemax: has joined #RubyOnRails
[05:18:41] Tempesta: has joined #RubyOnRails
[05:19:18] bronson: has joined #RubyOnRails
[05:23:51] moei: has joined #RubyOnRails
[05:25:30] leeky: has joined #RubyOnRails
[05:29:18] moei: has joined #RubyOnRails
[05:35:13] egray: has joined #RubyOnRails
[05:39:34] srinidhi: has joined #RubyOnRails
[05:48:20] jhfisc: has joined #RubyOnRails
[06:03:15] jhfisc: has joined #RubyOnRails
[06:05:18] techsethi: has joined #RubyOnRails
[06:05:40] cgfbee: has joined #RubyOnRails
[06:07:13] leclerc: has joined #RubyOnRails
[06:08:07] jhfisc: has joined #RubyOnRails
[06:10:27] leclerc: Let's talk about architecturing.
[06:13:12] jhfisc: has joined #RubyOnRails
[06:26:24] jhfisc: has joined #RubyOnRails
[06:30:49] ur5us: has joined #RubyOnRails
[06:33:04] andrewray: are there any other mvc frameworks besides rails that load files on demaned via autoload_paths, or is it just rails?
[06:36:51] jhfisc: has joined #RubyOnRails
[06:44:15] jhfisc: has joined #RubyOnRails
[06:47:29] AzaToth: has joined #RubyOnRails
[06:47:59] conta: has joined #RubyOnRails
[06:52:03] jhfisc: has joined #RubyOnRails
[06:58:08] jhfisc: has joined #RubyOnRails
[07:05:57] jhfisc: has joined #RubyOnRails
[07:08:59] shime: has joined #RubyOnRails
[07:11:12] jhfisc: has joined #RubyOnRails
[07:20:06] bronson: has joined #RubyOnRails
[07:20:24] b0zz0: has joined #RubyOnRails
[07:24:02] snickers: has joined #RubyOnRails
[07:25:35] andrewray: has joined #RubyOnRails
[07:26:35] andrewray: has joined #RubyOnRails
[07:27:10] andrewray: has joined #RubyOnRails
[07:27:59] andrewray: has joined #RubyOnRails
[07:28:54] andrewray: has joined #RubyOnRails
[07:31:49] defsdoor: has joined #RubyOnRails
[07:32:41] dionysus69: has joined #RubyOnRails
[07:44:43] one_zero: has joined #RubyOnRails
[07:55:14] solars: has joined #RubyOnRails
[07:57:18] solars: hi, I've got problems comparing timestamps in Rspec, especially AR Objects to the same attribute returned on an endpoint. How do you generally compare this? I noticed differences in milliseconds, formats, etc - e.g. I just tried expect(DateTime.parse(resp['result']['last_generated']).rfc2822).to eq metadata.generated_timestamp.rfc2822 but get 02 Dec vs 2 Dec
[07:57:30] DrYockel: has joined #RubyOnRails
[07:59:51] ams__: has joined #RubyOnRails
[08:01:11] jhfisc: has joined #RubyOnRails
[08:03:28] shime: has joined #RubyOnRails
[08:05:32] mikecmpbll: has joined #RubyOnRails
[08:06:00] dionysus69: has joined #RubyOnRails
[08:18:26] jhfisc: has joined #RubyOnRails
[08:19:14] frojnd: has joined #RubyOnRails
[08:21:19] blackmesa: has joined #RubyOnRails
[08:24:42] dionysus69: I have confusion over whenever gem
[08:25:01] dionysus69: it has let's say every 1.minute do in config/schedule.rb which isn't executing every minute
[08:25:07] lord4163: has joined #RubyOnRails
[08:25:18] dionysus69: then I found whenever cli command which prints out cron job, whats the every 1.minute do block for then?
[08:25:32] dionysus69: if I still need a cron job ? :S
[08:25:55] ur5us: has joined #RubyOnRails
[08:26:13] mikecmpbll: whenever just generates cronjobs doesn't it?
[08:26:43] dionysus69: so the only point for this block every 1.minute do is to translate it later to cron? I thought this was itself executing
[08:27:06] dionysus69: so I was like what's the point of cron if ruby is doing the scheduled tasks, since it can, so I don't get what is the benefit of using cron
[08:27:45] mikecmpbll: it's well-trusted? :/
[08:27:48] jphase: has joined #RubyOnRails
[08:28:24] dionysus69: ok that's fair enough I guess, I don't know implications of trust in scheduling business so far ^.^
[08:28:27] ur5us: has joined #RubyOnRails
[08:28:30] tbuehlmann: dionysus69: have you read whenever's README?
[08:28:37] dionysus69: yes of course :D
[08:28:45] tbuehlmann: what do you think whenever is doing then?
[08:29:21] dionysus69: This will simply show you your schedule.rb file converted to cron syntax. doesn't say schedule file is just for translation
[08:29:29] dionysus69: would be a good note :)
[08:29:42] dionysus69: makes me think it's a second option
[08:32:48] jphase: has joined #RubyOnRails
[08:34:52] bruno-: has joined #RubyOnRails
[08:35:18] jhfisc: has joined #RubyOnRails
[08:40:50] solars: doesn't the rspec be_within matcher work with datetimes? I found it somewhere, tried in rails but expect(DateTime.parse(timestamp)).to be_within(1.minute).of timestamp says TypeError: expected numeric
[08:40:58] dionysus69: has joined #RubyOnRails
[08:43:48] lxsameer: has joined #RubyOnRails
[08:47:46] jhfisc: has joined #RubyOnRails
[08:48:30] bruno-: has joined #RubyOnRails
[08:51:03] marr: has joined #RubyOnRails
[08:52:57] jhfisc: has joined #RubyOnRails
[08:58:07] jhfisc: has joined #RubyOnRails
[09:04:06] jhfisc: has joined #RubyOnRails
[09:09:32] jhfisc: has joined #RubyOnRails
[09:15:01] jhfisc: has joined #RubyOnRails
[09:17:02] paranoicsan: has joined #RubyOnRails
[09:17:57] xibalba: has joined #RubyOnRails
[09:20:07] jhfisc: has joined #RubyOnRails
[09:21:20] bronson: has joined #RubyOnRails
[09:27:37] mauro1254: has joined #RubyOnRails
[09:27:57] jhfisc: has joined #RubyOnRails
[09:30:15] dionysus69: has joined #RubyOnRails
[09:31:20] workmad3: has joined #RubyOnRails
[09:31:40] mauro1254: Hi folks! I'm working on a migration and I want to remove two index that are built on a common subset of fields (eg. index 1 on columns :a, :b, :c & index 2 on :a, :d). When the migration try to remove the second index it gaves an error
[09:32:26] mauro1254: I get the following error: ArgumentError: No indexes found on ckeditor_assets with the options provided.
[09:39:44] roshanavand: has joined #RubyOnRails
[09:40:06] jhfisc: has joined #RubyOnRails
[09:47:36] blackmesa: has joined #RubyOnRails
[09:51:33] frojnd: Hi here... I got `undefined method `per' for #<Attachment::ActiveRecord_AssociationRelation` when I added '.per' on @enquiry.attachments.order(:id).per(:pagination_defaults) don't know how to solve this one
[09:53:39] Sigyn: has joined #RubyOnRails
[09:56:19] jhfisc: has joined #RubyOnRails
[09:57:22] matthewd: frojnd: Well, where have you defined that method?
[10:33:01] kitsuneyo: has joined #RubyOnRails
[10:55:55] alfiemax_: has joined #RubyOnRails
[11:09:56] zeitchef: has joined #RubyOnRails
[11:13:54] unreal: has joined #RubyOnRails
[11:21:34] matcouto: has joined #RubyOnRails
[11:22:25] bronson: has joined #RubyOnRails
[11:33:52] tcopeland: has joined #RubyOnRails
[11:35:00] Ergo: has joined #RubyOnRails
[11:37:44] frojnd: matthewd: Ah i forgot about irc
[11:37:56] frojnd: I've solved in the meantime. Thank you.
[11:38:56] frojnd: But I do have question with active admin though :p If I have a model Users and I have an attribute there user_type, how would I display only users which meets user_type == "worker" condition?
[11:39:20] frojnd: I know active admin has filter widget on the right side but then I have to manually write under user_type field
[11:42:00] ldnunes: has joined #RubyOnRails
[11:48:15] alfiemax: has joined #RubyOnRails
[11:51:01] ShalokShalom: has joined #RubyOnRails
[11:52:18] xiljin: has joined #RubyOnRails
[11:59:38] Jameser: has joined #RubyOnRails
[12:15:27] fmcgeough: has joined #RubyOnRails
[12:15:38] kitsuneyo: has joined #RubyOnRails
[12:24:50] alfiemax: has joined #RubyOnRails
[12:26:07] arBmind: has joined #RubyOnRails
[12:30:19] AdamOnRails: has joined #RubyOnRails
[12:31:59] matcouto: has joined #RubyOnRails
[12:32:56] Jameser: has joined #RubyOnRails
[12:34:29] AdamOnRails: anyone know why im getting this error when tryin to gem install datepicker...
[12:36:21] AdamOnRails: http://www.paste.org/86803
[12:38:46] dionysus69: has joined #RubyOnRails
[12:41:19] chouhoulis: has joined #RubyOnRails
[12:44:44] f3ttX]: has joined #RubyOnRails
[12:45:58] dionysus69: Is there a benefit to make rails production run with its stock server with an nginx as proxy ? or is it better to run nginx with passenger module? because I have experience with nginx/passenger configuration and I don't know how different would the first option be
[12:47:16] jphase: has joined #RubyOnRails
[12:47:48] ShalokShalom_: has joined #RubyOnRails
[12:57:44] jphase: has joined #RubyOnRails
[13:00:43] fragamus: has joined #RubyOnRails
[13:02:50] rfoust: has joined #RubyOnRails
[13:13:05] rfoust: has joined #RubyOnRails
[13:21:09] workmad3: has joined #RubyOnRails
[13:23:20] bronson: has joined #RubyOnRails
[13:29:34] apparition: has joined #RubyOnRails
[13:33:10] matcouto: has joined #RubyOnRails
[13:34:34] tcopeland: adamonrails: maybe check the clock on your machine to see if it’s skewed? that can cause cert validation errors
[13:37:44] AdamOnRails: negative, comp clock on point
[13:40:43] kitsuneyo: has joined #RubyOnRails
[13:52:27] mostlybadfly: has joined #RubyOnRails
[13:57:11] machinewar: has joined #RubyOnRails
[13:57:44] machinewar: getting a template error when rendering an email template from within a mailer action. https://gist.github.com/AlexWheeler/1115b8f80d4a429044f6e37ef47c9855. it works in rails console, but not on server. any ideas?
[13:57:51] machinewar: It must be that something isn't loaded
[14:00:39] jhfisc: has joined #RubyOnRails
[14:01:54] frojnd: How would I apply such filter User.where(user_type: "worker") for active admin index page without filters? The idea is that user only sees Users of type workers by default. Any help appreciated pretty please
[14:02:56] lupine: User.where(intuit_filter(params) || { user_type: "worker" }) innit
[14:06:30] bruno-: has joined #RubyOnRails
[14:18:54] orbyt_: has joined #RubyOnRails
[14:19:47] kitsuneyo: has joined #RubyOnRails
[14:22:18] blackmesa: has joined #RubyOnRails
[14:23:29] ule: has joined #RubyOnRails
[14:24:22] ule: has left #RubyOnRails: ()
[14:25:03] fragamus: has joined #RubyOnRails
[14:28:23] jhfisc: has joined #RubyOnRails
[14:30:58] matcouto: has joined #RubyOnRails
[14:32:06] paranoicsan: has joined #RubyOnRails
[14:34:43] mikecmpbll: has joined #RubyOnRails
[14:35:04] theunraveler: has joined #RubyOnRails
[14:38:04] jhfisc: has joined #RubyOnRails
[14:44:20] jhfisc: has joined #RubyOnRails
[14:47:34] marr: has joined #RubyOnRails
[14:51:41] matcouto: has joined #RubyOnRails
[14:52:09] jhfisc: has joined #RubyOnRails
[14:56:56] machinewar: has joined #RubyOnRails
[15:04:00] jhfisc: has joined #RubyOnRails
[15:04:00] robnester: has joined #RubyOnRails
[15:08:29] zeitchef: Hi everyone! Any particular reason this code doesn't work for preventing a layout to generate? - https://gist.github.com/zeitchef/8407c015a8d6ff1fdce3b782132594b4
[15:09:05] jhfisc: has joined #RubyOnRails
[15:12:02] jtperreault: zeitchef: dont you need to compare it in your unless statement?
[15:13:30] jtperreault: zeitchef: https://gist.github.com/jtperreault/e2f6d2747c1f0a17ccf7dfc5565b3dca
[15:23:59] jhfisc: has joined #RubyOnRails
[15:24:13] bronson: has joined #RubyOnRails
[15:26:08] mikecmpbll: has joined #RubyOnRails
[15:27:23] matcouto: has joined #RubyOnRails
[15:32:57] jhfisc: has joined #RubyOnRails
[15:35:49] fragamus: has joined #RubyOnRails
[15:36:13] cagomez: has joined #RubyOnRails
[15:37:54] robnester: has joined #RubyOnRails
[15:38:07] jhfisc: has joined #RubyOnRails
[15:51:11] gusrub: has joined #RubyOnRails
[15:53:33] kapil___: has joined #RubyOnRails
[15:55:24] [Butch]: has joined #RubyOnRails
[15:57:00] jhfisc: has joined #RubyOnRails
[15:59:32] centrx: has joined #RubyOnRails
[16:05:58] deevil: has joined #RubyOnRails
[16:06:45] hotspot: has joined #RubyOnRails
[16:07:11] hotspot: hello! can someone please help me understand this answer? https://stackoverflow.com/a/32389579
[16:08:33] orbyt_: has joined #RubyOnRails
[16:09:32] deevil: can anybody here help me with something related to activerecord’s ability to delete dependent associations? I’ve got a has_and_belongs_to_many association, and need “.destroy” to use more than just the ID to delete children. I’m using database partitioning, so all queries like select, delete, etc., need to pass “client_id” in addition to the ID field. I’m finding a collection owned by a client and doing
[16:09:33] deevil: “@collection.destroy” is trying to delete the children from other models without usign the ID.
[16:09:35] tbuehlmann: hotspot: what's the problem?
[16:11:26] hotspot: tbuehlmann: sorry, I got distracted by someone before I finished writing it up
[16:11:35] hotspot: I am interested in the "runner do {block}" syntax
[16:11:53] hotspot: can I see some documentation on that? I didn't find anything clear so far
[16:11:59] hotspot: maybe I am just searching wrong
[16:12:30] hotspot: essentially, I'd like to be sure this cannot run in any other context than when the applicaton is run by 'rails runner x'
[16:13:41] tbuehlmann: it basically registers the block: https://github.com/rails/rails/blob/d1daf4c31301f5f5917b877fd63a817f5f4608ed/railties/lib/rails/railtie.rb#L142
[16:14:13] tbuehlmann: you'll have to trace what register_block_for does and how the block is later used
[16:16:24] dionysus69: has joined #RubyOnRails
[16:21:52] daveomcd: has joined #RubyOnRails
[16:24:44] daveomcd: I'm trying to create a search feature for my site, but I'm wanting to use "Sidekiq" to assist in making the search a background process so it doesn't bog down my entire website. I don't understand how I pass my results from the job when it completes back to my application though. Right now I have where the page refreshes my partial every 5 seconds, but how do I pass my results from my job to my page? Or do I need to write it
[16:24:44] daveomcd: to a temp file, and then read from the file?
[16:27:58] deevil: daveomcd: I use websockets to notify users when a background job has completed
[16:27:58] jhfisc: has joined #RubyOnRails
[16:28:23] daveomcd: deevil, is that a rails 5 only feature? this app i have is still on rails 4 for the time being
[16:31:16] deevil: daveomcd: Rails 5 sure makes it easier, but websockets can be used with Rails 4. I’m still supporting a Rails 4 app that uses the “websocket-rails” gem, but had to jump through a few hoops to get it all working properly, due to weird issues with threading and EventMachine. I ultimately went with a branch the websocket-rails author told me about. Not sure if it’s all been merged into master yet, but the branch has been t
[16:31:16] deevil: for quite a long time..
[16:31:18] deevil: gem 'websocket-rails', github: 'moaa/websocket-rails', branch: 'threadsocket-rails'
[16:31:18] deevil: gem 'websocket-rails-js', github: 'websocket-rails/websocket-rails-js', branch: 'sub_protocols'
[16:32:37] daveomcd: deevil, ahh ok thanks! i appreciate the help
[16:34:10] jhfisc: has joined #RubyOnRails
[16:34:15] deevil: daveomcd: no problem. If it’s not too hard to upgrade from Rails 4 to 5, ActionCable is great, and tends to just work, but I haven’t really had any issues running the sockets I linked you to. I’m using nginx/puma/rails4 for that site
[16:36:51] jhfisc: has joined #RubyOnRails
[16:36:57] daveomcd: deevil, yep i want to upgrade to rails 5 but I've had 4 major features I needed to complete before starting that. And this is the last one - so I'm excited to get this one behind me so i can. I appreciate the help I'm looking into it
[16:38:41] deevil: sounds good, daveomcd!
[16:43:17] troys: has joined #RubyOnRails
[16:51:14] cagomez: has joined #RubyOnRails
[16:54:27] andrewray: has joined #RubyOnRails
[16:54:50] [Butch]: has joined #RubyOnRails
[16:55:19] andrewray: are there any other mvc frameworks besides rails that load files on demaned via autoload_paths, or is it just rails?
[17:04:59] kitsuneyo: has joined #RubyOnRails
[17:05:07] one_zero: has joined #RubyOnRails
[17:05:14] jhfisc: has joined #RubyOnRails
[17:05:46] leclerc: has joined #RubyOnRails
[17:08:10] hahuang65: has joined #RubyOnRails
[17:08:58] [Butch]: has joined #RubyOnRails
[17:18:21] cstls: has joined #RubyOnRails
[17:24:48] moei: has joined #RubyOnRails
[17:26:05] bronson: has joined #RubyOnRails
[17:29:45] cagomez: has joined #RubyOnRails
[17:32:40] opekktar: has joined #RubyOnRails
[17:34:24] truenito: has joined #RubyOnRails
[17:37:34] opekktar: has left #RubyOnRails: ()
[17:45:23] rrichardsr3: has joined #RubyOnRails
[17:46:36] conta1: has joined #RubyOnRails
[17:48:48] kitsuneyo: has joined #RubyOnRails
[17:49:06] mjuhl: has joined #RubyOnRails
[17:50:35] brent__: has joined #RubyOnRails
[17:52:20] blackmesa: has joined #RubyOnRails
[17:53:00] cagomez: has joined #RubyOnRails
[17:53:01] orbyt_: has joined #RubyOnRails
[17:54:07] shime: has joined #RubyOnRails
[17:54:07] netzfisch: has joined #RubyOnRails
[17:58:09] sameerynho: has joined #RubyOnRails
[18:02:43] mikecmpbll: has joined #RubyOnRails
[18:07:16] snickers: has joined #RubyOnRails
[18:08:08] mjuhl: I have an Active Record field called "archived". Is there a way to create a select scope, such that when I `render json: @item` archived: false is not shown?
[18:08:23] srinidhi: has joined #RubyOnRails
[18:10:34] fragamus: has joined #RubyOnRails
[18:19:53] fragamus: has joined #RubyOnRails
[18:22:40] Saukk: has joined #RubyOnRails
[18:30:55] orbyt_: has joined #RubyOnRails
[18:32:24] dionysus70: has joined #RubyOnRails
[18:33:36] MasterAsia: has joined #RubyOnRails
[18:33:54] MasterAsia: rails cookies are encrypted by secret_key_base, right?
[18:34:02] MasterAsia: This prevents tampering and reading on the client-side?
[18:35:06] matthewd: masterasia: Either signed or encrypted depending on (configuration and) version, IIRC
[18:35:39] MasterAsia: matthewd, signed -> can be read, can't be tampered / encrypted -> can't be read or tampered
[18:35:41] MasterAsia: am I correct in that?
[18:36:17] fryguy: this is also only applicable to the session cookie, and it's configurable whether you are storing session data in the cookie or not
[18:37:33] matthewd: Oh, yes, good point -- session cookie only
[18:37:43] tcopeland: has joined #RubyOnRails
[18:44:10] ur5us: has joined #RubyOnRails
[18:46:51] mtkd: has joined #RubyOnRails
[18:47:35] rrichardsr3: has joined #RubyOnRails
[18:47:40] fragamus: has joined #RubyOnRails
[18:57:36] mtkd: has joined #RubyOnRails
[19:26:53] bronson: has joined #RubyOnRails
[19:27:41] zeitchef: has joined #RubyOnRails
[19:32:38] zeitchef: hi there, junior dev here. i'm practicing basic authentication, created a new rails app without javascript, user scaffold, now i'm having trouble with destroying users. the link_to is somehow mapped to users#show. can anyone point me into a direction, why this might be happening?
[19:36:12] orbyt_: has joined #RubyOnRails
[19:38:38] zeitchef: has joined #RubyOnRails
[19:44:49] Trynemjoel: has joined #RubyOnRails
[19:50:17] gusrub: has joined #RubyOnRails
[19:50:27] baweaver: zeitchef: why no JS?
[19:50:48] baweaver: Destroy works with JS as HTTP DELETE doesn't work without it*
[19:51:04] zeitchef: Thanks, that's really great to know!
[19:51:22] baweaver: https://stackoverflow.com/questions/1908693/how-can-i-send-a-http-delete-request-from-browser
[19:51:31] zeitchef: I was only focused on basic authentication and wanted to keep my footprint small... guess it was a bad idea
[19:51:35] baweaver: It was mainly due to crap support of DELETE when Rails was made.
[19:52:00] baweaver: Assume browsers have Javascript, and the standard builtin won't be that bad.
[19:53:24] zeitchef: Is it possible to add 'stock' JS into an already created app?
[19:55:53] cpruitt: has joined #RubyOnRails
[20:00:33] srinidhi: has joined #RubyOnRails
[20:01:57] baweaver: you _could_ make a new rails app and copy-paste or try generating over your current one
[20:02:11] baweaver: depends though, if you disabled it by not including the file it's simple to turn back on
[20:02:41] orbyt_: has joined #RubyOnRails
[20:04:07] jhfisc: has joined #RubyOnRails
[20:07:18] zeitchef: thanks for the tips, definitely learned a lesson
[20:10:06] jhfisc: has joined #RubyOnRails
[20:23:30] b0zz0: has joined #RubyOnRails
[20:27:00] cagomez: has joined #RubyOnRails
[20:27:24] sagax: has joined #RubyOnRails
[20:28:01] orbyt_: Slightly off topic..I had an `EADDRINUSE` error due to the port being in use..I used `kill -9 [process_id]` to kill it. What is `-9` in this context? Google results have not been helpful.
[20:28:53] fryguy: 9 is the ID of the erroneously named KILL signal
[20:29:03] fryguy: well, the process "kill" is what is erroneously named
[20:29:40] fragamus: has joined #RubyOnRails
[20:29:52] fryguy: kill really means "send a signal to this process" the default signal that gets sent is TERM, which is roughly equivalent to pressing ctrl-c to stop a program. you can send other signals, and kill lets you specify them either by name (like TERM, KILL) etc, or by id. the id for KILL is 9
[20:30:08] kitsuneyo: has joined #RubyOnRails
[20:30:09] orbyt_: Right, by default it sends TERM right?
[20:30:09] orbyt_: Lol, ninja'd
[20:30:11] orbyt_: Alright, thank you.
[20:30:21] fryguy: KILL differs from TERM in that it stops the process no matter what, and will prevent the process from doing cleanup and stuff, it's uncatchable and untrappable.
[20:30:35] fryguy: i'm glossing over some details here, so don't take this as definitive.
[20:31:27] orbyt_: Nope, just wanted a high level overview, so thank you. This page (http://man7.org/linux/man-pages/man1/kill.1.html) also provided some good info.
[20:33:48] blackmesa1: has joined #RubyOnRails
[20:33:52] harrycs: has joined #RubyOnRails
[20:34:10] fryguy: one detail worth not glossing over is that you generally shouldn't send SIGKILL to a process unless you really have to, you should always try TERM first. it leads to unclean shutdowns and problems a lot
[20:34:46] fryguy: if you SIGKILL a database server, for example, you have a very high likelihood of data corruption or a very long start next time as it does data recovery
[20:35:24] fryguy: defaulting to kill -9 is a lot like defaulting to putting sudo in the front of every command. it's dangerous
[20:40:07] jhfisc: has joined #RubyOnRails
[20:46:06] jhfisc: has joined #RubyOnRails
[20:46:12] mtkd: has joined #RubyOnRails
[20:50:52] hahuang65: has joined #RubyOnRails
[20:52:26] jhfisc: has joined #RubyOnRails
[20:53:31] cnk: has joined #RubyOnRails
[21:01:38] orbyt_: fryguy Noted.
[21:07:00] harrycs: has joined #RubyOnRails
[21:17:33] matcouto: has joined #RubyOnRails
[21:19:25] jhfisc: has joined #RubyOnRails
[21:21:02] mtkd: has joined #RubyOnRails
[21:27:55] bronson: has joined #RubyOnRails
[21:38:11] SteenJobs: has joined #RubyOnRails
[21:38:54] mtkd: has joined #RubyOnRails
[21:41:04] ecksit: has joined #RubyOnRails
[21:41:05] harrycs: has joined #RubyOnRails
[21:44:49] clouder|grr: has joined #RubyOnRails
[21:55:15] harrycs: has joined #RubyOnRails
[21:57:08] harrycs: Hi, I'm just getting started here. On this Index view, I'm working on formatting the table correctly based on whether a user is an admin (to change table structure slightly to display admin options correctly)
[21:57:21] orbyt_: has joined #RubyOnRails
[21:58:08] harrycs: For part of this, I just need to add one line in the header.. This is the way I hacked together, does it look okay? It seems a bit strange to be forcing html as string but.. whatever: <%= '<th colspan="3"></th>'.html_safe if current_user.admin? %>
[21:58:56] harrycs: I could make a whole if block, but it seems a little over the top to turn one line into three
[22:02:17] cagomez: has joined #RubyOnRails
[22:04:33] FCser: has joined #RubyOnRails
[22:05:18] alfiemax_: has joined #RubyOnRails
[22:11:03] lxsameer: has joined #RubyOnRails
[22:21:23] marr: has joined #RubyOnRails
[22:28:48] harrycs: has joined #RubyOnRails
[22:29:42] ArTiSTiX: has joined #RubyOnRails
[22:35:27] ResidentBiscuit: has joined #RubyOnRails
[22:37:53] egray: has joined #RubyOnRails
[22:38:08] GodFather: has joined #RubyOnRails
[22:40:34] cnk: harrycs: In general it is easier and more tasteful to do that sort of thing in a helper method rather than in your view. For something like this I would probably make a method that returns the entire header row - and do the 'if admin' part in that method
[22:40:41] hfp_work: has joined #RubyOnRails
[22:40:44] hotspot: has left #RubyOnRails: ()
[22:40:57] Radar: what cnk said
[22:43:04] harrycs: ah okay, and do you mean directly in the module in app/helpers or in a partial in the view?
[22:43:08] harrycs: Thanks for the feedback btw :)
[22:44:06] cnk: I have done things both ways so 'it depends'
[22:44:57] cnk: for example, you oculd biuld things up with content_tag or do 2 partials and decide between them in the helper
[22:45:28] cnk: I am slightly in favor of the former for this case
[22:46:31] cnk: whichever way you go, then a similar strategy for building the data rows for that table
[22:47:06] harrycs: Ah oh my god, I didn't even realize content_tag was a thing - which totally makes sense of course. I'll give it a shot! Thanks for the tip, I really appreciate it
[23:03:12] chouhoulis: has joined #RubyOnRails
[23:04:10] DylanJ: has joined #RubyOnRails
[23:09:24] cagomez: has joined #RubyOnRails
[23:14:04] bronson: has joined #RubyOnRails
[23:18:18] jhfisc: has joined #RubyOnRails
[23:22:05] cagomez: has joined #RubyOnRails
[23:24:39] jhfisc: has joined #RubyOnRails
[23:29:48] jhfisc: has joined #RubyOnRails
[23:39:41] fschuindt: has joined #RubyOnRails
[23:44:28] ahrs: has joined #RubyOnRails
[23:44:35] jhfisc: has joined #RubyOnRails
[23:56:03] fschuindt: has joined #RubyOnRails
[23:56:19] DylanJ: has joined #RubyOnRails