« Back to channel list

#RubyOnRails - 02 February 2016

« Back 1 day Forward 1 day »
[00:02:11] GeorgesLeYeti: Htmltoword.config.custom_templates_path = "#{Rails.root}/templates"
[00:02:16] KensoDev: has joined #RubyOnRails
[00:02:19] GeorgesLeYeti: Htmltoword::Document.create_and_save('<html><head></head><body><p>Hello</p></body></html>', "#{Rails.root}/b.docx", 'test')
[00:02:36] chipotle: has joined #RubyOnRails
[00:02:39] GeorgesLeYeti: I put my template test.docx inside my templates directory.
[00:02:44] nerium: How do I auto load classes from the lib/ folder? I tired adding config.autoload_paths << Rails.root.join("lib???), but that didnt work
[00:03:33] smathy: GeorgesLeYeti, so b.docx is a file inside your rails_root/templates directory?
[00:03:34] baweaver: has joined #RubyOnRails
[00:04:14] GeorgesLeYeti: smathy, no b.docx is the output file
[00:04:33] GeorgesLeYeti: I just made some test inside rails console
[00:04:37] b2zeldafreak: has joined #RubyOnRails
[00:04:55] smathy: GeorgesLeYeti, so you have a template file named just "test" with no extension?
[00:05:02] GeorgesLeYeti: My template test.docx is the template.
[00:05:25] GeorgesLeYeti: smathy, no need to add the extension
[00:05:25] Pazician: has joined #RubyOnRails
[00:05:43] ja: has joined #RubyOnRails
[00:05:50] smathy: GeorgesLeYeti, what gives you that impression?
[00:06:01] GeorgesLeYeti: inside htmltoword/lib/htmltoword/document.rb template_name += extension if template_name && !template_name.end_with?(extension)
[00:06:42] GeorgesLeYeti: but i already try with .docx too
[00:08:46] GeorgesLeYeti: Btw to make my template, I copy/paste the default template and replace all font by Tahoma
[00:09:22] smathy: GeorgesLeYeti, sorry, don't know then.
[00:09:58] GeorgesLeYeti: smathy, No prob. Ty
[00:12:16] NBarnes: has joined #RubyOnRails
[00:13:52] NBarnes: has joined #RubyOnRails
[00:14:01] legohead: has joined #RubyOnRails
[00:16:03] sankaber: has joined #RubyOnRails
[00:16:56] zyzioziom: has joined #RubyOnRails
[00:17:27] NBarnes: has joined #RubyOnRails
[00:18:04] tomaw: has joined #RubyOnRails
[00:18:34] MaDErroR123: has joined #RubyOnRails
[00:25:03] speakingcode: has joined #RubyOnRails
[00:28:28] pjb42: has joined #RubyOnRails
[00:30:00] shaileshg: has joined #RubyOnRails
[00:32:22] ur5us: has joined #RubyOnRails
[00:32:24] aaronmoodie: has joined #RubyOnRails
[00:33:05] kirillzh: has joined #RubyOnRails
[00:33:09] baweaver: has joined #RubyOnRails
[00:36:07] lexileo: has joined #RubyOnRails
[00:44:39] chipotle: has joined #RubyOnRails
[00:45:11] sankaber: has joined #RubyOnRails
[00:45:33] someish: has joined #RubyOnRails
[00:46:07] k13nox_: has joined #RubyOnRails
[00:47:44] DLSteve: has joined #RubyOnRails
[00:52:48] pyemkey: has joined #RubyOnRails
[00:55:09] moeabdol: has joined #RubyOnRails
[00:55:52] _Tariq: has joined #RubyOnRails
[00:56:56] akaiiro: has joined #RubyOnRails
[00:58:24] Chachi: has joined #RubyOnRails
[00:59:36] alex88: has joined #RubyOnRails
[00:59:51] cmckee: has joined #RubyOnRails
[01:00:57] k13nox: has joined #RubyOnRails
[01:01:31] kies^: has joined #RubyOnRails
[01:02:36] sevenseacat: has joined #RubyOnRails
[01:03:43] mikeiniowa: has joined #RubyOnRails
[01:07:56] kirillzh: has joined #RubyOnRails
[01:08:16] kirillzh: has joined #RubyOnRails
[01:08:55] kirillzh: has joined #RubyOnRails
[01:10:21] kirillzh_: has joined #RubyOnRails
[01:10:42] NBarnes: has joined #RubyOnRails
[01:10:49] cmckee: Anyone free to help me refactor - Im trying to move logic from View to Model
[01:10:57] cmckee: My Current code: https://gist.github.com/cmckee-dev/c409b883d49540ba63c8
[01:11:16] cmckee: I just need some help getting pointed in the right direction
[01:11:48] atrius: has joined #RubyOnRails
[01:12:42] dopamean_: has joined #RubyOnRails
[01:13:02] Pharaoh2: has joined #RubyOnRails
[01:14:40] NBarnes: has joined #RubyOnRails
[01:14:44] legohead: has joined #RubyOnRails
[01:15:59] rhizome: cmckee: you have articles in @article_months
[01:16:24] NBarnes: has joined #RubyOnRails
[01:16:40] rhizome: i would just delete the @articles line and rename @article_months to @articles. you'll also want to sort.reverse.whatever in the controller
[01:17:02] ogpastal_: has joined #RubyOnRails
[01:17:41] rhizome: then you can partialize it. render @articles, then in _article render the list, itself partialized
[01:18:03] user083: I get an undefined error when i can a active record relation
[01:18:14] rhizome: when you take its job away?
[01:18:36] user083: it works in the console but not in a view
[01:18:44] cmckee: @articles = Articles.all.group_by {|t| t.created_at.beginning_of_montt}
[01:19:04] cmckee: Then change around the logic in the view?
[01:19:07] rhizome: .sort.reverse
[01:19:18] smathy: user083, "when i can a active record relation" ?
[01:19:26] rhizome: which you should be able to do all in AR without ruby
[01:19:31] user083: I noticed that spelling mistake
[01:19:42] rhizome: did you consider clarifying it
[01:20:02] user083: I am calling the active record relation but it does not find it
[01:20:12] user083: @user.friendships.each
[01:20:18] smathy: user083, ah, ok.
[01:20:20] rhizome: maybe the user has no friends
[01:20:28] smathy: user083, !gist your code
[01:20:28] helpa: user083: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[01:20:55] NBarnes: has joined #RubyOnRails
[01:20:57] rhizome: that's why i say it's best to render collection partials. render @user.friends handles empty relations easily
[01:21:04] user083: https://gist.github.com/b05b3e95c2a52f9c5b0a
[01:21:19] rhizome: every time you think you need .each in the view, render a colletion
[01:21:27] smathy: user083, looks fine to me.
[01:21:43] user083: but this fails @user.friendships.each
[01:21:47] user083: undefined method `friendships' for #<User::ActiveRecord_Relation:0x007fc07f954678>
[01:22:01] nettoweb: has joined #RubyOnRails
[01:22:15] smathy: user083, @user is not an individual user.
[01:22:23] smathy: user083, but you're not showing *that* code in your gist.
[01:22:45] NBarnes: has joined #RubyOnRails
[01:23:09] user083: here is the view https://gist.github.com/22f286eec36cca95c891
[01:24:06] smathy: Holy mother of God.
[01:24:10] KensoDev: has joined #RubyOnRails
[01:24:15] smathy: user083, @user is not an individual User object.
[01:24:28] ferr: has joined #RubyOnRails
[01:24:44] user083: i think it is
[01:24:54] user083: i define it this way @user = User.where(username: params[:username])
[01:25:01] user083: in the controller
[01:25:25] smathy: user083, right, where() does not return an individual User instance.
[01:26:08] NBarnes: has joined #RubyOnRails
[01:26:20] user083: i got it to work
[01:26:21] user083: @user = User.where(username: params[:username]).first
[01:26:25] user083: smathy: Thanks
[01:26:31] smathy: user083, you're welcome.
[01:26:45] moeabdol1: has joined #RubyOnRails
[01:26:55] sevenseacat: keep in mind that sometimes @user will then be nil.
[01:27:00] ferr: Hey, I need to make a daily calendar to display activities of multiple users at single window, any suggestions what shall I use?
[01:27:29] smathy: ferr, a loop.
[01:27:50] NBarnes: has joined #RubyOnRails
[01:28:27] meves: has joined #RubyOnRails
[01:30:23] zyzioziom: has joined #RubyOnRails
[01:33:32] jahbrewski: has joined #RubyOnRails
[01:35:09] benlieb: has joined #RubyOnRails
[01:36:31] yoongkang: has joined #RubyOnRails
[01:41:01] tego101: has joined #RubyOnRails
[01:41:32] Chachi: has joined #RubyOnRails
[01:42:59] sankaber: has joined #RubyOnRails
[01:46:16] meves_: has joined #RubyOnRails
[01:46:23] tego101: has joined #RubyOnRails
[01:48:21] atrius: has joined #RubyOnRails
[01:53:09] jkamenik: has joined #RubyOnRails
[01:54:13] jottr_: has joined #RubyOnRails
[01:56:30] ogpastaling: has joined #RubyOnRails
[01:58:11] bronson: has joined #RubyOnRails
[01:58:36] yfeldblum: has joined #RubyOnRails
[01:58:37] underplank: has joined #RubyOnRails
[01:58:41] srinidhi: has joined #RubyOnRails
[01:59:31] meves: has joined #RubyOnRails
[02:00:00] underplank: Hi all, im tryin to get autotest, rspec and rails working. I was able to get rspec working, and autotest working with minitest. How do you configure autotest to run specs?
[02:00:53] underplank: I???ve also got a .rspec file in the root directory and an .autotest file as well.
[02:02:04] sevenseacat: autotest is quite old school
[02:03:01] underplank: sevenseacat: ahh.. what should I be using instead?
[02:03:20] Oliphaunte: has joined #RubyOnRails
[02:03:22] underplank: I basically want the same functionality, ie re-run tests of code change.
[02:03:23] sevenseacat: guard is the more common tool, and comes with adapters for minitest and everything else you can think of
[02:03:29] shmilan: has joined #RubyOnRails
[02:03:38] underplank: ahh right. thanks for the tip. i???ll go look at that.
[02:05:59] rickmasta: has joined #RubyOnRails
[02:06:35] paradisaeidae: has joined #RubyOnRails
[02:08:47] mcr-credil: has joined #RubyOnRails
[02:08:51] Palsson: has joined #RubyOnRails
[02:10:33] srinidhi: has joined #RubyOnRails
[02:15:27] legohead: has joined #RubyOnRails
[02:18:58] kirillzh: has joined #RubyOnRails
[02:19:32] doei: has joined #RubyOnRails
[02:22:02] juddey: has joined #RubyOnRails
[02:22:24] doei: Hi, I'd like to use Rails 5 in api-mode and action cable, but I can't find a clean way to get the client side code to use in my front-end, it seems it's only made available in the app/assets/ folder (which isn't provided in api-mode)
[02:24:53] kirillzh: What authentication method is recommended for mobile only app? Specifically I need stateless authentication. For now I implemented simple token based authentication, and found out about JWT. But since JWT can't be revoked, so I am looking for another secure authentication method.
[02:27:28] doei: kirillzh, you can try devise_token_auth, it's pretty drastic i find, and you can revoke your tokens..
[02:28:01] treaki: has joined #RubyOnRails
[02:28:44] northfurr: has joined #RubyOnRails
[02:28:50] northfurr: has joined #RubyOnRails
[02:29:45] northfurr: anyone here familiar with the clearance gem? I???m trying to add a flash message when users try to register with an email that???s already taken
[02:29:51] kirillzh: doei, if I get Facebook uid and token from the mobile client, is it appropriate gem for this case? (I've never used Devise before).
[02:32:20] doei: kirillzh, yeah, they have a section on the readme about that, check out omniauth
[02:33:42] kirillzh: doei, so client shouldn't directly request Facebook? Client hits my server for auth, server redirects client to Facebook login, and after server generates token, etc.?
[02:34:18] pwnd_nsfw`: has joined #RubyOnRails
[02:34:56] shmilan: has joined #RubyOnRails
[02:36:06] kirillzh: doei, by client I mean mobile client.
[02:37:21] yoongkang: has joined #RubyOnRails
[02:37:26] codedmart: has joined #RubyOnRails
[02:39:30] Alazoral: has joined #RubyOnRails
[02:39:33] codedmart: has joined #RubyOnRails
[02:40:46] doei: kirillzh, omniauth is a bit of a back and forth to get the token, but i don't think your client ever deals with facebook after that, I never used oauth before though so i can't say for sure
[02:41:16] pwnd_nsfw`: has left #RubyOnRails: ()
[02:41:28] pwnd_nsfw: has joined #RubyOnRails
[02:41:55] Rodya_: has joined #RubyOnRails
[02:43:46] baweaver: has joined #RubyOnRails
[02:47:32] ogpastaling: has joined #RubyOnRails
[02:49:41] droptone: Question: is this the correct syntax for increasing the timeout for RestClient to 100 seconds? response = RestClient::Request.execute(method: :get, url: "https://our.api.endpoint/api", timeout: 100, headers: {authorization: "#{account.auth_header}" })
[02:49:50] OxADD1DEAD: has joined #RubyOnRails
[02:50:00] kirillzh: doei, yeah, that's what I am concerned about. My client already handles Facebook authentication and should send Facebook uid and token. At this point, I am not sure which approach I should use.
[02:50:05] droptone: I believe it is, I'm just not noticing a difference regaridng subverting 504 errors, want to confirm.
[02:50:41] kirillzh: droptone, look good to me.
[02:52:42] kirillzh: https://stackoverflow.com/questions/10483418/how-to-set-timeout-in-restclient-gem-in-ruby
[02:53:15] kirillzh: Not sure why he says that worst case scenario is 20 seconds.
[02:53:36] rafaelfranca: has joined #RubyOnRails
[02:53:48] kirillzh: Just out of curiosity, try another rest client like Typhoues.
[02:55:23] droptone: Yeah, that would be a real PITA to have to recode our software to use a different rest client, I'll give it a shot if required but that's a bitch if it only lets you max out at 20 seconds.
[02:58:38] _Tariq: has joined #RubyOnRails
[02:59:32] zyzioziom: has joined #RubyOnRails
[02:59:47] kirillzh: droptone, I actually prefer Typhoeus, it wraps around curl, so it's faster than other client. I've benchmarked different clients about a year ago.
[03:00:30] droptone: Nice, good to know.
[03:01:09] doei: kirillzh, so yeah at least devise_token_auth won't let the client deal directly with any authentication provider, other than a redirect link to authorize your app from facebook when signing up
[03:01:36] doei: otherwise it sorta sounds like your client is already a facebook app
[03:01:59] kirillzh: doei. client just uses Facebook SDK to authenticate.
[03:02:24] jottr_: has joined #RubyOnRails
[03:02:29] kirillzh: doei, if I want to use device_auth_token, does it mean, that client won't need to use Facebook SDK?
[03:02:56] doei: yep that's it
[03:03:50] superlou: has joined #RubyOnRails
[03:04:08] kirillzh: Not sure if that's good or bad :) Client will have to do more work, I guess. As well as server. Agh
[03:05:06] ogpastaling: has joined #RubyOnRails
[03:05:50] doei: it's good when you don't want to bother your users with another account, and let facebook authenticate your users for you... Also you might want to use info your users have on their facebook profile.
[03:06:45] juddey: sevenseacat: PM?
[03:07:55] OxADD1DEAD: Stupid question: I have a JS file in 'assets/javascripts/' that I want to include in my html.erb file but for some reason '<%= javascript_include_tag('<filename>') %>' isn't taking it. Any ideas?
[03:08:12] sevenseacat: "isnt taking it"?
[03:08:46] OxADD1DEAD: "...Asset was not declared to be precompiled in production..."
[03:09:10] KnownSyntax: has joined #RubyOnRails
[03:09:19] ryanRT: has joined #RubyOnRails
[03:09:31] OxADD1DEAD: Something about including it in some assests.rb in /config
[03:09:46] sevenseacat: did you do that? :)
[03:11:58] chipotle: has joined #RubyOnRails
[03:14:40] dopie: hey all why is the user not beging logged in?
[03:14:41] dopie: http://www.screencast.com/t/MCmcUKJTp
[03:16:12] legohead: has joined #RubyOnRails
[03:16:46] paradisaeidae: has joined #RubyOnRails
[03:18:55] OxADD1DEAD: sevenseacat: even if i do it, it doesn't make a difference. I thought if the applications.js folder had the "//= require ." it was covered.
[03:19:06] sevenseacat: thats two totally different things
[03:19:20] sevenseacat: //= require will include that file into your complied application.js
[03:19:23] OxADD1DEAD: Actually thats a lie, it loads, but the file doesn't run, my bad.
[03:21:28] OxADD1DEAD: Ah, makes sense. I can get it to work fine with using HTML script tags, but not the ERB stuff. The file is purely visual-effects so would it matter which way I included it?
[03:22:09] OxADD1DEAD: i.e. i am not accessing variables out of it.
[03:23:52] sleungcy: has joined #RubyOnRails
[03:25:18] Bloomer: has joined #RubyOnRails
[03:27:05] B1n4r10: has joined #RubyOnRails
[03:28:34] enitiz: has joined #RubyOnRails
[03:29:29] HenriettaSalt: has joined #RubyOnRails
[03:33:10] OxADD1DEAD: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[03:34:29] douglass1: has joined #RubyOnRails
[03:36:37] arup_r: has joined #RubyOnRails
[03:38:45] krz: has joined #RubyOnRails
[03:44:50] baweaver: has joined #RubyOnRails
[03:45:05] alex88: has joined #RubyOnRails
[03:45:07] workmad3: has joined #RubyOnRails
[03:50:19] benlakey_: has joined #RubyOnRails
[03:52:56] djbkd: has joined #RubyOnRails
[03:54:51] MaDErroR123: has joined #RubyOnRails
[03:56:11] meves: has joined #RubyOnRails
[03:58:25] fryguy: has joined #RubyOnRails
[04:03:11] jottr_: has joined #RubyOnRails
[04:03:51] fryguy: has joined #RubyOnRails
[04:05:01] baweaver: has joined #RubyOnRails
[04:05:59] lemur: has joined #RubyOnRails
[04:06:38] lexileo: has joined #RubyOnRails
[04:07:24] underplank: has joined #RubyOnRails
[04:08:55] douglass1: has left #RubyOnRails: ()
[04:09:09] ^CrYpto^: has joined #RubyOnRails
[04:09:43] ryanRT: has joined #RubyOnRails
[04:12:37] Rodya_: has joined #RubyOnRails
[04:13:04] HenriettaSalt: has joined #RubyOnRails
[04:13:57] pawnbox: has joined #RubyOnRails
[04:13:58] HenriettaSalt: has joined #RubyOnRails
[04:15:02] sevenseacat: the ERB just generates a script tag, so
[04:15:23] joshkovach: has joined #RubyOnRails
[04:17:01] legohead: has joined #RubyOnRails
[04:17:14] braincrash: has joined #RubyOnRails
[04:19:14] fryguy: has joined #RubyOnRails
[04:21:28] barhum2013: has joined #RubyOnRails
[04:23:26] northfurr: has joined #RubyOnRails
[04:26:38] underplank: has joined #RubyOnRails
[04:27:56] hahuang61: has joined #RubyOnRails
[04:30:25] zyzioziom: has joined #RubyOnRails
[04:30:43] peterevjan: has joined #RubyOnRails
[04:32:52] Palsson: has joined #RubyOnRails
[04:33:25] DLSteve: has joined #RubyOnRails
[04:37:47] krz: has joined #RubyOnRails
[04:42:40] nickjj_: has joined #RubyOnRails
[04:43:13] dpsk: has joined #RubyOnRails
[04:45:24] sankaber: has joined #RubyOnRails
[04:47:43] Gaelan: has joined #RubyOnRails
[04:48:01] Gaelan: Is there a way to get the model from a form helper?
[04:48:33] Gaelan: I want to display the a property of a model in a nested form.
[04:49:05] sevenseacat: (or replace f withwhatever your form builder s stored as)
[04:49:42] Gaelan: sevenseacat: Thanks!
[04:54:57] pyemkey: has joined #RubyOnRails
[04:57:56] jkamenik: has joined #RubyOnRails
[04:58:06] peterevjan: has joined #RubyOnRails
[04:59:15] underplank: has joined #RubyOnRails
[05:01:25] barhum2013: has joined #RubyOnRails
[05:02:11] pawnbox: has joined #RubyOnRails
[05:03:43] fedexo: has joined #RubyOnRails
[05:04:05] jottr_: has joined #RubyOnRails
[05:07:42] ftj: has joined #RubyOnRails
[05:07:50] ayonkhan: has joined #RubyOnRails
[05:12:32] apotry: has joined #RubyOnRails
[05:15:25] qejk: has joined #RubyOnRails
[05:15:43] arup_r: has joined #RubyOnRails
[05:15:53] Brother_Emmett: has joined #RubyOnRails
[05:18:02] legohead: has joined #RubyOnRails
[05:18:45] moeabdol: has joined #RubyOnRails
[05:21:28] PedramT: has joined #RubyOnRails
[05:24:25] KazW: has joined #RubyOnRails
[05:24:43] nickjj: has joined #RubyOnRails
[05:24:49] benlieb_: has joined #RubyOnRails
[05:26:29] peterevjan: has joined #RubyOnRails
[05:26:58] tvw: has joined #RubyOnRails
[05:28:16] PedramT: has joined #RubyOnRails
[05:29:42] HenriettaSalt: has joined #RubyOnRails
[05:32:41] Limix: has joined #RubyOnRails
[05:33:55] praveen: has joined #RubyOnRails
[05:35:31] NBarnes: has joined #RubyOnRails
[05:36:57] atmosx_laptop: has joined #RubyOnRails
[05:40:30] K_r3aPeR: has joined #RubyOnRails
[05:42:30] moeabdol1: has joined #RubyOnRails
[05:43:12] Chachi: has joined #RubyOnRails
[05:43:26] MaDErroR123: has joined #RubyOnRails
[05:43:26] Rodya_: has joined #RubyOnRails
[05:44:17] Rodya_: has joined #RubyOnRails
[05:47:03] tetraktys: has joined #RubyOnRails
[05:49:33] paradisaeidae: has joined #RubyOnRails
[05:53:51] peterevjan: has joined #RubyOnRails
[05:55:59] nozpheratu: has joined #RubyOnRails
[05:56:31] djbkd: has joined #RubyOnRails
[05:57:17] lxsameer: has joined #RubyOnRails
[05:58:06] SteenJobs: has joined #RubyOnRails
[06:00:03] zyzioziom: has joined #RubyOnRails
[06:02:01] ziyadb: has joined #RubyOnRails
[06:04:55] jottr_: has joined #RubyOnRails
[06:08:00] yeticry_: has joined #RubyOnRails
[06:11:21] K_r3aPeR: has joined #RubyOnRails
[06:11:22] peterevjan: has joined #RubyOnRails
[06:11:43] rodfersou: has joined #RubyOnRails
[06:13:45] benlieb: has joined #RubyOnRails
[06:17:04] dionysus69: has joined #RubyOnRails
[06:18:57] legohead: has joined #RubyOnRails
[06:21:28] darutoko: has joined #RubyOnRails
[06:21:43] neanderslob: has joined #RubyOnRails
[06:23:51] sandstrom: has joined #RubyOnRails
[06:24:33] mnurmi: has joined #RubyOnRails
[06:25:41] yoongkang: has joined #RubyOnRails
[06:29:29] peterevjan: has joined #RubyOnRails
[06:30:56] Ratler: has joined #RubyOnRails
[06:30:57] HenriettaSalt: has joined #RubyOnRails
[06:31:56] ur5us: has joined #RubyOnRails
[06:33:06] ur5us: has joined #RubyOnRails
[06:33:15] chouhoul_: has joined #RubyOnRails
[06:34:16] DoubleMalt: has joined #RubyOnRails
[06:35:08] IrishGringo: has joined #RubyOnRails
[06:35:35] mdw: has joined #RubyOnRails
[06:35:51] User458764: has joined #RubyOnRails
[06:38:00] krz: has joined #RubyOnRails
[06:39:24] emchamp: has joined #RubyOnRails
[06:39:32] Alazoral: has joined #RubyOnRails
[06:43:28] workmad3: has joined #RubyOnRails
[06:52:53] andrew9184: has joined #RubyOnRails
[06:52:58] baweaver: has joined #RubyOnRails
[06:56:08] pyemkey: has joined #RubyOnRails
[06:58:19] peterevjan: has joined #RubyOnRails
[07:00:41] rogue_koder: has joined #RubyOnRails
[07:01:18] Dreeg: has joined #RubyOnRails
[07:03:06] kerunaru: has joined #RubyOnRails
[07:03:16] ur5us: has joined #RubyOnRails
[07:03:53] tego101: has joined #RubyOnRails
[07:04:10] nodejunkie: has joined #RubyOnRails
[07:04:35] jbermudes: Anyone here use factory_girl for tests?
[07:04:56] helpa: Nope. No one. Ever. In the history of the world.
[07:05:05] baweaver: well that's snarky of it...
[07:05:15] baweaver: thought that one was "Ask anyone"
[07:05:26] sevenseacat: I like that one.
[07:06:08] jbermudes: It's a shame nobody's ever tried it. Maybe I'll make it into the history books as the first person ever to use it
[07:06:16] chagel: has joined #RubyOnRails
[07:06:44] baweaver: what seems to be the issue?
[07:07:16] jottr_: has joined #RubyOnRails
[07:07:57] jbermudes: I'm wondering what it takes to do some custom calculations in a transient block and then set an attribute based on that: https://gist.github.com/jbermudes/bd5c9d1cfc9c85024050
[07:08:27] sevenseacat: if you have dynamic values in factories, please wrap them in curly braces
[07:08:46] sevenseacat: hell, I wrap every attribute definition in curly braces
[07:08:50] jbermudes: sevenseacat: oooh, so it's evaluated at runtime and not just at load time?
[07:09:05] sevenseacat: yep :) eg. subtype_id { 3...10.to_a.sample }
[07:09:17] sevenseacat: and so its not the same for every factory instantiation
[07:09:29] jbermudes: So like, in the gist, a Course has a capacity of students based on its subtype. So I'd like to pick a random subtype and then adjust the capacity based on sampling from an array
[07:09:49] jbermudes: But apparently line 11 is illegal because it thinks subtype_id is a trait that doesn't exist
[07:10:06] baweaver: use a different name
[07:10:13] baweaver: also make sure you're using FG 1.4+
[07:10:25] rails690: has joined #RubyOnRails
[07:10:32] baweaver: if it matches a current attribute (like the _id name) it'll probably colide
[07:10:43] baweaver: and using the name of the model causes it to create a new one
[07:10:55] jbermudes: ah, good point. I figured I was using FG 1.4+ because it told me to use transient instead of ignore, but I should double check
[07:10:58] baweaver: that, and transient attributes don't work on versions less than that.
[07:11:13] baweaver: ACTION had a nightmare of that a few days back
[07:11:47] jbermudes: Apparently I'm using 4.5
[07:11:49] AimlessRAven: has joined #RubyOnRails
[07:12:19] rails690: how can i use the gems 'Roo' and 'Axlsx' at the same time using the latest versions?
[07:12:27] rails690: i get a rubyzip version conflict
[07:12:44] moeabdol1: has joined #RubyOnRails
[07:12:47] AimlessRAven: hi all whats wrong in my rspec nested resource controller describe https://gist.github.com/anonymous/03a9d2ce6dee8d96c1e7
[07:12:51] baweaver: jbermudes: my version meter in my head is probably screwy
[07:12:56] AimlessRAven: how to assign address to user.addresses
[07:12:59] AimlessRAven: and then add id
[07:13:05] sevenseacat: rails690: if you're getting a conflict, then you can't
[07:13:16] baweaver: AimlessRaven: same as we told you yesterday
[07:13:33] rails690: thats pretty sad
[07:13:57] AimlessRAven: baweaver: but this didnt work
[07:14:00] sevenseacat: rails690: feel free to report an issue at whichever gem is using the incompatible version, or put in a patch for it :)
[07:14:05] baweaver: rails690: suggested to open a PR on the gem
[07:14:22] rvanlieshout: has joined #RubyOnRails
[07:14:37] baweaver: there's probably a reason for it, though most likely said reason is not updating the gem dependencies
[07:15:08] IrishGringo: has joined #RubyOnRails
[07:16:59] scepticulous: has joined #RubyOnRails
[07:17:58] agit0: has joined #RubyOnRails
[07:18:16] jbermudes: baweaver: Weird. Changing "subtype_id" to "foo" on lines 5 and 11 only changed the error message to say that foo is not a trait instead of subtype_id not being a trait
[07:18:51] moeabdol: has joined #RubyOnRails
[07:19:14] legohead: has joined #RubyOnRails
[07:19:17] sevenseacat: jbermudes: did you try wrapping them in curly braces?
[07:19:41] User458764: has joined #RubyOnRails
[07:19:51] Spami: has joined #RubyOnRails
[07:20:10] sevenseacat: also, subtype_id doesnt need to be transient there
[07:20:46] baweaver: transient is only for things that don't _really_ belong to the model
[07:20:58] baweaver: like passing variables to a function that don't get to a create method
[07:21:01] singam: has joined #RubyOnRails
[07:21:19] sevenseacat: if capacity isnt a field on your model, it shouldnt be transient either
[07:21:26] sevenseacat: *if capacity is
[07:21:43] baweaver: could just use `subtype_id { (1..10).to_a.sample }`
[07:22:02] jbermudes: oh, I missed the curly brace on one of the lines, so now that works thanks.
[07:22:18] jbermudes: capacity isn't a field of my model, it's something I need for the after create hook to make my associations
[07:22:31] jbermudes: To populate a course with students
[07:22:57] sevenseacat: ok, fair enough
[07:23:02] jbermudes: I was under the impression that transient blocks are where I throw things that aren't fields of my model, is that correct?
[07:23:34] sevenseacat: its where you put things that are for the factory, not for the model it generates
[07:23:41] solars: has joined #RubyOnRails
[07:24:07] ogpastaling: has joined #RubyOnRails
[07:24:15] jbermudes: so if I don't need something to be available to the factory outside of the factory definition I can just make up attribute names as pseudo-local variables?
[07:24:36] baweaver: also, be warned, write afters like this: after(:create) do |model, evaluator| evaluator.name_of_transient end
[07:24:52] sevenseacat: how else can you write them? >_>
[07:24:52] msyvich_: has joined #RubyOnRails
[07:24:53] pawnbox: has joined #RubyOnRails
[07:25:15] jbermudes: Yeah, thats the way I've seen it done in tutorials, but I think I saw an old one use after_create or something
[07:25:18] Pazician: has joined #RubyOnRails
[07:28:34] K_r3aPeR: has joined #RubyOnRails
[07:33:01] HenriettaSalt: has joined #RubyOnRails
[07:35:18] arBmind: has joined #RubyOnRails
[07:37:08] C0r3: has joined #RubyOnRails
[07:37:22] arBmind1: has joined #RubyOnRails
[07:37:24] bahar: has joined #RubyOnRails
[07:38:06] C0r3: Why the name ruby on rails and not rails on ruby???
[07:39:07] C0r3: baweaver: Okay... What's his nick by the way!
[07:39:17] baweaver: He's not on here.
[07:39:51] C0r3: Any email id so that anyone can get in touch with him.
[07:39:55] sevenseacat: twitter.com/dhh have fun.
[07:40:02] chouhoulis: has joined #RubyOnRails
[07:40:13] C0r3: sevenseacat: Okay... Thank you!! :P
[07:40:16] baweaver: Not to dash your dreams, but this sounds like a bad idea
[07:40:47] sevenseacat: baweaver: but it will be amazingly entertaining.
[07:41:09] jbermudes: If anything at least we'll get a new thing to add to helpa
[07:42:21] baweaver: !dontpokethebear
[07:42:21] helpa: 'this seems like a bad idea, perhaps you should reconsider'
[07:42:34] jbermudes: So if you can define arbitrary attributes as stores for temporary/local data, does it ever make sense to use actual ruby local variables in a factory in the form of foo = bar instead of foo { bar }?
[07:42:58] sevenseacat: yes, if you need to.
[07:43:40] yfeldblum: has joined #RubyOnRails
[07:44:33] jbermudes: Good to know
[07:44:47] dionysus69: I don't get how rails ember app authentication would work even theoretically, what is handled by frontend and what is by backend in this case?
[07:45:41] arup_r: has joined #RubyOnRails
[07:45:41] artto: has joined #RubyOnRails
[07:45:48] baweaver: http://kbarrett.com/blog/2014/03/24/authentication-with-ember-rails.html
[07:46:27] dionysus69: thanks baweaver will take a look
[07:47:30] pawnbox: has joined #RubyOnRails
[07:47:53] moeabdol: has joined #RubyOnRails
[07:48:00] ur5us: has joined #RubyOnRails
[07:50:54] C0r3: I just tweeted him asking why rails framework is called ruby on rails and not rails on ruby....
[07:51:15] C0r3: https://twitter.com/VijayKumarHackr/status/694426184206012416
[07:53:40] lipoqil: has joined #RubyOnRails
[07:53:57] KazW: has joined #RubyOnRails
[07:54:17] sevenseacat: hly shit he responded
[07:54:51] sevenseacat: thats awesome.
[07:56:08] rogue_koder: has joined #RubyOnRails
[07:56:32] MaDErroR123: has joined #RubyOnRails
[07:56:33] C0r3: has joined #RubyOnRails
[07:57:56] C0r3: And he replied!!
[07:58:38] duncannz: has joined #RubyOnRails
[07:59:14] baweaver: has joined #RubyOnRails
[07:59:29] pyemkey: has joined #RubyOnRails
[07:59:45] Andr3as: 1:59 am in chicago - this guy has a serious issue ;)
[08:00:02] arup_r: has joined #RubyOnRails
[08:00:59] jbermudes: Ruby on Rails makes sense though. You're using ruby in a predefined convention (the rails) to get to a destination faster
[08:01:14] aganov: has joined #RubyOnRails
[08:01:31] Andr3as: typically railroads aint faster :p
[08:01:32] nocontrol: has joined #RubyOnRails
[08:01:54] rrawlins: has joined #RubyOnRails
[08:02:13] jbermudes: They aren't? I'm from LA and anything is faster than a car stuck in traffic :P
[08:02:44] zyzioziom: has joined #RubyOnRails
[08:04:07] KazW: has joined #RubyOnRails
[08:08:03] jottr_: has joined #RubyOnRails
[08:10:59] agoldboi: has joined #RubyOnRails
[08:12:00] sandstrom: has joined #RubyOnRails
[08:14:00] pawnbox_: has joined #RubyOnRails
[08:18:04] yoongkang: has joined #RubyOnRails
[08:18:43] dpsk: has joined #RubyOnRails
[08:19:04] Macaveli: has joined #RubyOnRails
[08:19:51] mark2: has joined #RubyOnRails
[08:20:04] legohead: has joined #RubyOnRails
[08:20:32] Atomic_LduoX: has joined #RubyOnRails
[08:22:27] yoongkang: has joined #RubyOnRails
[08:23:13] worknick: has joined #RubyOnRails
[08:23:45] worknick: how can i add anchor param to link_to_next_page so that when new content is appendend the page automatically palces it self on that anchor
[08:23:59] yoongkang: has left #RubyOnRails: ()
[08:24:08] neanderslob: has joined #RubyOnRails
[08:24:13] Atomic_LduoX: has left #RubyOnRails: ()
[08:24:35] sevenseacat: depends what link_to_next_page is and what options it takes
[08:25:13] worknick: its Kaminari pagination.
[08:25:19] sevenseacat: then check the kaminari docs
[08:25:50] Cohedrin: has joined #RubyOnRails
[08:29:49] praveen: has joined #RubyOnRails
[08:33:53] HenriettaSalt: has joined #RubyOnRails
[08:37:16] Macaveli: has joined #RubyOnRails
[08:38:36] krz: has joined #RubyOnRails
[08:38:38] mdw: has joined #RubyOnRails
[08:39:35] zyzioziom: has joined #RubyOnRails
[08:40:52] Brother_Emmett: has left #RubyOnRails: ()
[08:41:07] chouhoulis: has joined #RubyOnRails
[08:41:50] snowy: has joined #RubyOnRails
[08:42:01] Thouren: has joined #RubyOnRails
[08:42:43] Snowy_: has joined #RubyOnRails
[08:46:09] frans3011: has joined #RubyOnRails
[08:46:48] mdw: has joined #RubyOnRails
[08:49:11] Thouren: has joined #RubyOnRails
[08:51:21] Thouren: has joined #RubyOnRails
[08:52:46] Thouren: has joined #RubyOnRails
[08:57:39] PedramT: has joined #RubyOnRails
[09:00:25] agoldboi: has joined #RubyOnRails
[09:02:06] solars: has joined #RubyOnRails
[09:02:16] bronson: has joined #RubyOnRails
[09:02:26] pawnbox: has joined #RubyOnRails
[09:04:00] bruce_lee: has joined #RubyOnRails
[09:06:13] legohead: has joined #RubyOnRails
[09:06:33] snowy: has joined #RubyOnRails
[09:08:45] yoongkang: has joined #RubyOnRails
[09:12:25] jsrn_: has joined #RubyOnRails
[09:13:13] rrawlins: has joined #RubyOnRails
[09:14:08] k13nox: has joined #RubyOnRails
[09:14:20] praveen: has joined #RubyOnRails
[09:14:59] manfrin: has joined #RubyOnRails
[09:19:31] quazimodo: has joined #RubyOnRails
[09:19:44] bmalum: has joined #RubyOnRails
[09:20:42] tetraktys: has joined #RubyOnRails
[09:24:01] enkristoffer: has joined #RubyOnRails
[09:24:05] Pumukel: has joined #RubyOnRails
[09:27:42] moeabdol1: has joined #RubyOnRails
[09:28:26] KazW: has joined #RubyOnRails
[09:29:26] PedramT: has joined #RubyOnRails
[09:30:51] nodejunkie: has joined #RubyOnRails
[09:31:10] jds: has joined #RubyOnRails
[09:31:43] DirtyFInn: has joined #RubyOnRails
[09:31:47] jgt1: has joined #RubyOnRails
[09:34:13] loechel: has joined #RubyOnRails
[09:34:31] Ergo: has joined #RubyOnRails
[09:34:32] HenriettaSalt: has joined #RubyOnRails
[09:34:55] ur5us: has joined #RubyOnRails
[09:38:21] elaptics`: has left #RubyOnRails: ("Bye")
[09:38:43] elaptics: has joined #RubyOnRails
[09:40:59] Palsson: has joined #RubyOnRails
[09:41:02] rubyonrails748: has joined #RubyOnRails
[09:41:37] blackhuey: has joined #RubyOnRails
[09:41:53] chouhoulis: has joined #RubyOnRails
[09:42:23] gingray: has joined #RubyOnRails
[09:43:02] workmad3: has joined #RubyOnRails
[09:44:53] GeorgesLeYeti: has joined #RubyOnRails
[09:47:12] GeorgesLeYeti: I have some difficulties for using htmltoword gem. My template docx doesn't work. Actually I just want to create a docx file (from and HTML file) with font-family = Tahoma and font-size = 10
[09:47:36] EdwardIII: i'm at that early stage where i look at stuff like puma & passenger and i'm like "huh, just pick one i guess"
[09:47:36] rubyonrails900: has joined #RubyOnRails
[09:48:04] workmad3: has joined #RubyOnRails
[09:49:43] CocoJumbo_: has joined #RubyOnRails
[09:50:16] nettoweb: has joined #RubyOnRails
[09:50:16] oded: has joined #RubyOnRails
[09:52:23] bruce__lee: has joined #RubyOnRails
[09:53:56] tbuehlmann: GeorgesLeYeti, that's kind of unrelated to rails, right?
[09:54:31] tbuehlmann: EdwardIII, they all have their pros and cons. I'm pretty happy with puma
[09:55:16] rickmasta: has joined #RubyOnRails
[09:55:25] CocoJumbo_: is there anybody there?
[09:55:42] EdwardIII: tbuehlmann: i don't suppose you work from a particular ansible playbook for that kind of setup?
[09:56:14] bruce__lee: has joined #RubyOnRails
[09:56:33] GeorgesLeYeti: tbuehlmann, maybe but don't know where i'm suppose to find help for that problem
[09:59:28] CocoJumbo_: somebody know how disable useless messages at this chat?
[09:59:40] tbuehlmann: GeorgesLeYeti, I don't know the gem, have you checked if there's an IRC channel for it? or a bugtracker?
[09:59:58] rafaelfranca: has joined #RubyOnRails
[10:00:03] tbuehlmann: EdwardIII, I don't use ansible and don't have a playbook
[10:00:36] EdwardIII: i guess rails users tend to use capistrano
[10:04:00] tbuehlmann: that's what I used in the past
[10:04:17] tbuehlmann: but I've heard good things about ansible, too. it's on my list
[10:08:58] pawnbox: has joined #RubyOnRails
[10:12:17] CocoJumbo_: people, tell please, may same ways disable joined messages?
[10:13:42] sevenseacat: CocoJumbo_: check the settings in your IRC client.
[10:14:19] DaniG2k: has joined #RubyOnRails
[10:14:36] gingray: has joined #RubyOnRails
[10:15:03] CocoJumbo_: sevenseacat: i use chrome browser
[10:15:05] lacrymology: has joined #RubyOnRails
[10:15:18] sevenseacat: so check your web client's settings.
[10:16:37] wethu: has joined #RubyOnRails
[10:16:53] CocoJumbo_: sevenseacat: better i download some irc client, what is popular?
[10:17:03] sevenseacat: depends on your operating system.
[10:17:57] sevenseacat: no idea. i dont use windows, sorry.
[10:18:40] CocoJumbo_: sevenseacat: thanks for others, i go to find client
[10:18:58] tbuehlmann: CocoJumbo_, when on windows, I'm using mIRC
[10:20:26] nettoweb: Hello guys, Im following this page to deploy my RoR app to DigitalOcean using Nginx+Unicorn: https://gist.github.com/ChuckJHardy/f44dda5f94c6bbdba9a4
[10:20:40] sevenseacat: ACTION gives up and leaves all the questions for the guys in the channel
[10:20:47] zpe: has joined #RubyOnRails
[10:21:12] nettoweb: But I have some wuestion about the section: Configure SSH, can someone tell me why he ask to do that 5 changes in ssh config file? Is it just for security?
[10:21:38] AzaToth: has joined #RubyOnRails
[10:22:43] pawnbox_: has joined #RubyOnRails
[10:23:53] yeticry_: has joined #RubyOnRails
[10:26:27] yeticry_: has joined #RubyOnRails
[10:28:49] blackmes1: has joined #RubyOnRails
[10:29:53] yeticry_: has joined #RubyOnRails
[10:30:19] mhoungbo: has joined #RubyOnRails
[10:30:41] dangerousdave: has joined #RubyOnRails
[10:30:43] arup_r: has joined #RubyOnRails
[10:31:09] DaniG2k: has joined #RubyOnRails
[10:31:17] Macaveli: has joined #RubyOnRails
[10:33:03] CornishPasty: Hey guys, sevenseacat, ladies
[10:33:05] CornishPasty: ACTION flees
[10:33:28] CocoJumbo__: has joined #RubyOnRails
[10:33:40] baweaver: has joined #RubyOnRails
[10:34:20] CocoJumbo__: has left #RubyOnRails: ()
[10:34:23] atmosx: has joined #RubyOnRails
[10:35:05] CocoJumbo: has joined #RubyOnRails
[10:35:16] HenriettaSalt: has joined #RubyOnRails
[10:35:30] atmosx: hello, I'm installed a series of plugins on redmine (a rails project management system) and now I'm getting this error: http://pastebin.com/D0CtzAtq
[10:35:46] atmosx: helpa: okay!
[10:36:11] atmosx: https://gist.github.com/atmosx/ebc2f4a44a9f60137a5f <--
[10:37:00] PedramT: has joined #RubyOnRails
[10:39:05] pydave6367: has joined #RubyOnRails
[10:40:00] workmad3: atmosx: you need to specify env vars at the start of a command, not in the command arguments
[10:40:13] atmosx: workmad3: I see
[10:40:29] workmad3: atmosx: e.g. `RAILS_ENV=production rails s`
[10:42:38] chouhoulis: has joined #RubyOnRails
[10:44:04] atmosx: workmad3: exporting the env, should work right? export RAILS_ENV=development and then rails s ?
[10:44:43] DoubleMalt: has joined #RubyOnRails
[10:46:05] workmad3: atmosx: correct
[10:46:28] workmad3: atmosx: at least, within the same terminal
[10:49:26] FooMunki: has joined #RubyOnRails
[10:50:21] ElFerna_: has joined #RubyOnRails
[10:57:09] pydave6367: has joined #RubyOnRails
[10:58:16] baweaver: has joined #RubyOnRails
[10:58:35] snowy: has joined #RubyOnRails
[10:59:03] marr: has joined #RubyOnRails
[11:01:02] barhum2013: has joined #RubyOnRails
[11:01:29] snowy: has joined #RubyOnRails
[11:02:54] PedramT: has joined #RubyOnRails
[11:02:56] srinidhi: has joined #RubyOnRails
[11:05:34] AimlessRAven: has joined #RubyOnRails
[11:06:30] AimlessRAven: has joined #RubyOnRails
[11:06:49] jgt1: has joined #RubyOnRails
[11:07:07] Axy: has joined #RubyOnRails
[11:07:38] AimlessRAven: hi evryone, why my = f.association :user, as: :select produce my users but not their name
[11:11:19] minver: has joined #RubyOnRails
[11:12:02] k13nox: has joined #RubyOnRails
[11:12:45] minver: What is a good name of a class with the purpose to select the best value from an array and return that? ..Picker, Decider, Fetcher?
[11:15:53] deur-: When I'm in doubt I always describe what the thing should do, pick the best matching verb and noun and try to come up with a name that makes sense
[11:16:10] deur-: You use "select" and "value", so probably "xxxValueSelector" would work
[11:16:23] deur-: replace xxx with whatever the array represents
[11:17:37] nocontrol: Does it make sense to move an ui-select that takes 25 lines in the _form template to another partial ? Is it a common practise ?
[11:18:06] User458764: has joined #RubyOnRails
[11:18:40] deur-: nocontrol: imho, if it improves your readability, sure
[11:18:54] deur-: if _form itself is like 15 lines I probably wouldn't bother
[11:19:12] sevenseacat: I'd only move it if you want to reuse it.
[11:19:14] deur-: unless you can recycle the markup
[11:19:27] nocontrol: deur-: no it's custom with lots of bootstrap stuff and ui-selects etc.
[11:19:52] nocontrol: deur-: I have a custom dropdown/select which takes 65 lines (!)
[11:20:13] nocontrol: sevenseacat: it is so I suppose I am not practising DRY so obviously the answer is yes
[11:20:18] nocontrol: sounds good
[11:20:29] sevenseacat: 65 lines of markup for a single form element sounds like a big problem.
[11:21:08] nocontrol: sevenseacat: I am wrapping in 80 characters/line
[11:21:19] rfellons: has joined #RubyOnRails
[11:21:26] nocontrol: so I am breaking down everything based on a soft wrap
[11:21:34] nocontrol: do I care too much about the beauty of the code ?
[11:22:01] nocontrol: It might be of OCD
[11:22:06] sevenseacat: that... sounds like an oxymoron to me
[11:22:23] deur-: I never adhere to 80 chars/line in HTML
[11:22:42] deur-: I usually try to in JS, but it often works out worse
[11:23:17] nocontrol: well it doesn't seem ugly
[11:23:31] nocontrol: and lets me split the screen in two and three parts
[11:23:51] deur-: if it works for you, it's all good :)
[11:24:26] nocontrol: I believe sevenseacat's point was right, it matters If it's reusable
[11:24:34] nocontrol: thanks people
[11:27:25] codedmart: has joined #RubyOnRails
[11:27:31] pawnbox: has joined #RubyOnRails
[11:29:20] praveen: has joined #RubyOnRails
[11:33:41] minver: deur-: thanks!
[11:34:45] baweaver: has joined #RubyOnRails
[11:36:02] HenriettaSalt: has joined #RubyOnRails
[11:36:05] dionysus69: has joined #RubyOnRails
[11:37:52] praveen: has joined #RubyOnRails
[11:38:48] dEPy: has joined #RubyOnRails
[11:39:25] wethu: has joined #RubyOnRails
[11:39:29] Mia: has joined #RubyOnRails
[11:39:29] Mia: has joined #RubyOnRails
[11:41:53] workmad3: dEPy: who are you calling 'people'? Seems like a big assumption to me ;)
[11:41:55] yoongkang: has joined #RubyOnRails
[11:42:18] dEPy: Citizens of this channel... Hear ye hear ye!
[11:42:33] dEPy: I just upgraded to 4.2.5.1 from 4.0.9 and I get some strange random errors for using "model.includes(:assoc)" in some places but not others. Says it's missing FROM clause.
[11:42:37] snowy: has joined #RubyOnRails
[11:43:10] kerunaru: has joined #RubyOnRails
[11:43:25] k13nox: has joined #RubyOnRails
[11:43:25] chouhoulis: has joined #RubyOnRails
[11:43:27] dEPy: oops sorry, using rails 4.1.14.1, pg 0.17.0, and Postgresql 9.4 I think
[11:43:30] workmad3: dEPy: add in a `.references(:assoc)` in the places where you want to use the association in a query as well as eager-load it
[11:43:46] dEPy: Is this 4.1+ ?
[11:44:03] workmad3: dEPy: they started moving towards it in 4.0 and then pulled the trigger on the change in 4.1 iirc
[11:44:08] dEPy: Cause I don't see it failing on all queries with "includes"
[11:44:24] workmad3: dEPy: not all queries that use `includes` will reference the association in the `where` clause
[11:44:36] dEPy: ah true, stupid me :)
[11:44:41] dEPy: thanks :)
[11:44:47] workmad3: dEPy: no probs :)
[11:44:50] gingray: has joined #RubyOnRails
[11:50:18] MaDErroR123: has joined #RubyOnRails
[11:50:42] c355E3B: has joined #RubyOnRails
[11:51:46] Eswar: has joined #RubyOnRails
[11:52:31] vasilakisFiL: has joined #RubyOnRails
[11:52:38] AimlessRAven: hi all, i have order model who belongs_to users, in my f.assiocation :user .. i see my user names but when i click submit.. doesent save, i add in my order controller user_ids => []
[11:52:42] AimlessRAven: but didnt work again
[11:53:03] iateadonut1: has joined #RubyOnRails
[11:54:15] jsrn_: has joined #RubyOnRails
[11:56:59] ogpastaling: has joined #RubyOnRails
[11:57:34] lacrymology: has joined #RubyOnRails
[11:57:36] tetraktys: has joined #RubyOnRails
[11:57:46] zpe: has joined #RubyOnRails
[12:00:11] bauruine: has joined #RubyOnRails
[12:00:13] codedmart: has joined #RubyOnRails
[12:01:48] PedramT: has joined #RubyOnRails
[12:02:21] krz: has joined #RubyOnRails
[12:08:12] bmalum: has joined #RubyOnRails
[12:10:29] ElFerna_: has joined #RubyOnRails
[12:13:00] CalydOn: has joined #RubyOnRails
[12:16:57] MaDErroR_: has joined #RubyOnRails
[12:17:36] pawnbox: has joined #RubyOnRails
[12:22:41] tetraktys: has joined #RubyOnRails
[12:23:41] quazimodo: has joined #RubyOnRails
[12:24:37] CalydOn: has left #RubyOnRails: ()
[12:24:47] meinside_: has joined #RubyOnRails
[12:26:39] snowy: has joined #RubyOnRails
[12:27:38] blackmes1: has joined #RubyOnRails
[12:29:48] snowy: has joined #RubyOnRails
[12:30:18] Meow-J: has joined #RubyOnRails
[12:30:25] DoubleMalt: has joined #RubyOnRails
[12:30:57] snowy: has joined #RubyOnRails
[12:32:03] bmalum: has joined #RubyOnRails
[12:33:01] PedramT: has joined #RubyOnRails
[12:33:16] Eswar: has joined #RubyOnRails
[12:33:46] solars: has joined #RubyOnRails
[12:34:43] bahar: has joined #RubyOnRails
[12:34:58] benlakey_: has joined #RubyOnRails
[12:36:07] bruce__lee: has joined #RubyOnRails
[12:36:46] HenriettaSalt: has joined #RubyOnRails
[12:36:55] elben: has joined #RubyOnRails
[12:37:12] ArTiSTiX: has joined #RubyOnRails
[12:37:17] amitchellbullard: has joined #RubyOnRails
[12:37:34] bruce__lee: has joined #RubyOnRails
[12:37:53] Ergo: has joined #RubyOnRails
[12:38:23] Bugson_: has joined #RubyOnRails
[12:38:26] barttenbrinke: has joined #RubyOnRails
[12:38:35] jsrn_: has joined #RubyOnRails
[12:38:46] BBHoss: has joined #RubyOnRails
[12:38:50] Lloyd: has joined #RubyOnRails
[12:39:10] Radar: has joined #RubyOnRails
[12:39:22] FooMunki: has joined #RubyOnRails
[12:39:37] Bugson: has joined #RubyOnRails
[12:39:40] Guest4184_____: has joined #RubyOnRails
[12:40:38] jottr_: has joined #RubyOnRails
[12:42:39] PedramT: has joined #RubyOnRails
[12:44:08] chouhoulis: has joined #RubyOnRails
[12:44:57] bauruine: has joined #RubyOnRails
[12:45:53] praveen__: has joined #RubyOnRails
[12:46:50] mickey_mouse: has joined #RubyOnRails
[12:47:46] blackmesa: has joined #RubyOnRails
[12:48:30] ferr: has joined #RubyOnRails
[12:50:00] dpsk1: has joined #RubyOnRails
[12:52:32] yardenbar: has joined #RubyOnRails
[12:56:00] fsteim: has joined #RubyOnRails
[12:56:20] codedmart: has joined #RubyOnRails
[12:58:23] bauruine: has joined #RubyOnRails
[13:00:13] someish: has joined #RubyOnRails
[13:00:57] AimlessRAven: hi, anyone knows why i have this error ?
[13:00:58] AimlessRAven: https://gist.github.com/anonymous/e128e4fbdff8274745c1
[13:03:09] rvanlieshout: because the object isn't invalid
[13:04:05] bronson: has joined #RubyOnRails
[13:05:35] AimlessRAven: rvanlieshout: how to make it invalid
[13:05:39] AimlessRAven: i need this scenario
[13:06:41] rvanlieshout: the validations in your model will tell you when it's invalid
[13:07:02] legohead: has joined #RubyOnRails
[13:09:17] mdw: has joined #RubyOnRails
[13:10:19] ElFerna_: has joined #RubyOnRails
[13:11:44] arup_r: has joined #RubyOnRails
[13:13:54] bauruine_: has joined #RubyOnRails
[13:14:04] bauruine: has joined #RubyOnRails
[13:17:04] sankaber: has joined #RubyOnRails
[13:17:22] AimlessRAven: one more question why give me this error https://gist.github.com/anonymous/bfabdea92fbdc1db6c94
[13:18:14] dpsk__: has joined #RubyOnRails
[13:22:06] rubyonrails877: has joined #RubyOnRails
[13:22:10] k13nox: has joined #RubyOnRails
[13:24:12] rickmasta: has joined #RubyOnRails
[13:25:17] User458764: has joined #RubyOnRails
[13:27:03] dtordable: has left #RubyOnRails: ()
[13:31:44] ZoffixW: has joined #RubyOnRails
[13:32:10] earfin: has joined #RubyOnRails
[13:32:33] BaNzounet: is it possible to do hash[:foo][:bar] with try? something like this : hash[:foo].try(:bar)
[13:33:37] jkamenik: has joined #RubyOnRails
[13:33:59] ZoffixW: Would you say RoR is tough to learn if you don't know Ruby? I was thinking of learning both at the same time... kill two birds sorta thing.
[13:34:31] rrawlins: ZoffixW: I learnt both at the same time, never did me much harm :)
[13:34:33] rails690: has joined #RubyOnRails
[13:34:59] ZoffixW: k :) Thanks
[13:35:00] pwnd_nsfw: ZoffixW, it's nice to know some ruby, sure
[13:35:04] AimlessRAven: can someone check my gist
[13:35:04] AimlessRAven: https://gist.github.com/anonymous/bfabdea92fbdc1db6c94
[13:35:12] pwnd_nsfw: I did a little studying on the syntax before hand
[13:35:15] AimlessRAven: i dont know why i have this error..
[13:35:41] rails690: What's the best way to 'modularize' a controller action that is used amongst almost all controllers? For example, 'export'. Should I put it into a concern?
[13:35:59] pwnd_nsfw: AimlessRaven, is it possible that it's saving?
[13:37:32] HenriettaSalt: has joined #RubyOnRails
[13:39:12] AimlessRAven: pwnd_nsfw: yea in my view evrything is ok .. i create order.. assign user to them
[13:39:44] AimlessRAven: but only in this part of controller test i have this error, and looks so strange
[13:40:22] pwnd_nsfw: well, it's not redirecting... and that only happens if it's saved correctly
[13:40:26] pwnd_nsfw: so, is it possible it's NOT saving?
[13:41:25] Ergo: has joined #RubyOnRails
[13:42:10] pwnd_nsfw: AimlessRaven, also, I noticed if thigns are working ok in production, but not in tests
[13:42:15] pwnd_nsfw: AimlessRaven, rake db:test:prepare
[13:43:45] zpe: has joined #RubyOnRails
[13:44:53] chouhoulis: has joined #RubyOnRails
[13:51:46] dekonix: has joined #RubyOnRails
[13:55:47] praveen: has joined #RubyOnRails
[13:57:43] AimlessRAven: pwnd_nsfw: i try.. but i get same result
[13:57:54] Grundell: has joined #RubyOnRails
[13:59:43] ramortegui: has joined #RubyOnRails
[14:00:47] agoldboi: has joined #RubyOnRails
[14:01:59] meves: has joined #RubyOnRails
[14:04:05] truenito: has joined #RubyOnRails
[14:04:59] praveen: has joined #RubyOnRails
[14:05:22] _Tariq: has joined #RubyOnRails
[14:06:30] volume166: has joined #RubyOnRails
[14:07:21] volume166: has left #RubyOnRails: ()
[14:08:34] kaikai2199: has joined #RubyOnRails
[14:10:42] joshkovach: has joined #RubyOnRails
[14:10:43] meves: has joined #RubyOnRails
[14:11:43] ElFerna_: has joined #RubyOnRails
[14:12:29] Bloomer: has joined #RubyOnRails
[14:12:45] yottanami: has joined #RubyOnRails
[14:13:39] yottanami: Is any way to automatically generate the rails log analyses and send it to mail using tools like request-log-analyzer
[14:15:18] k13nox: Hi, in Rails 5 with ActionCable, i try to render partial jbuilder like ApplicationController.render(partial: 'api/v1/messages/show', locals: { user: current_user, message: message }) but din't work with undefine locals variables :/
[14:16:08] rails690: What's the best way to 'modularize' a controller action that is used amongst almost all controllers? For example, 'export'. Should I put it into a concern?
[14:16:44] treaki_: has joined #RubyOnRails
[14:16:46] bmalum: has joined #RubyOnRails
[14:19:03] tetraktys: has joined #RubyOnRails
[14:19:35] blackmesa: has joined #RubyOnRails
[14:22:19] PedramT: has joined #RubyOnRails
[14:23:40] akshat: has joined #RubyOnRails
[14:25:24] legohead: has joined #RubyOnRails
[14:26:29] atomical: has joined #RubyOnRails
[14:26:47] snowy: has joined #RubyOnRails
[14:27:35] treaki__: has joined #RubyOnRails
[14:27:37] drbayer: has joined #RubyOnRails
[14:27:47] Moeh: has joined #RubyOnRails
[14:28:02] raunicolae: has joined #RubyOnRails
[14:28:05] praveen: has joined #RubyOnRails
[14:28:12] raunicolae: has left #RubyOnRails: ()
[14:28:30] aegis3121: has joined #RubyOnRails
[14:30:55] workmad3: rails690: I'd probably put it in ApplicationController personally
[14:31:28] ftj: has joined #RubyOnRails
[14:31:41] rails690: workmad3: personally, why?
[14:32:35] workmad3: rails690: because it makes more sense to me to use the base-class that everything has to share behaviour that's 'global' than to mix a module into every class
[14:32:59] HenriettaSalt: has joined #RubyOnRails
[14:33:04] drbayer: has joined #RubyOnRails
[14:33:12] rails690: workmad3: right
[14:33:19] rails690: workmad3: makes sense
[14:33:26] workmad3: rails690: however, I've also very rarely found a case where an action actually makes sense with the same implementation across everything... so I'd be hesitant about prematurely abstracting that too
[14:34:13] workmad3: rails690: and if I did, I'd be tempted to actually pull the shared business-logic out into something that lived in the model layer, and potentially have the boiler plate of a couple of lines just in each controller as a notice that it's there
[14:34:25] antgel: has joined #RubyOnRails
[14:34:47] griffindy: has joined #RubyOnRails
[14:35:01] rails690: workmad3: i see. thank you
[14:35:04] workmad3: rails690: long story short - you don't get to avoid thinking about how your system should fit together ;)
[14:36:12] treehug88: has joined #RubyOnRails
[14:38:07] stannard: has joined #RubyOnRails
[14:38:10] lipoqil: has joined #RubyOnRails
[14:38:52] drbayer: has joined #RubyOnRails
[14:39:31] rails690: workmad3: i think about it all the time, because im tired of having to update code in every single controller/view when I change it because it's similar for each model
[14:39:56] rails690: workmad3: and I also think about modularizing my application so I can plug and play components ive built before
[14:40:00] mary5030: has joined #RubyOnRails
[14:40:25] rails690: workmad3: if you have any tips for me in this matter, its appreciated
[14:40:34] nzst: has joined #RubyOnRails
[14:41:05] nzst: Hi, on a rails install, is there a flag I can pass so the unicorn gem is enabled?
[14:41:20] ryanRT: has joined #RubyOnRails
[14:41:34] workmad3: rails690: welcome to the world of software design :)
[14:41:40] ravster: has joined #RubyOnRails
[14:42:20] mary5030: has joined #RubyOnRails
[14:42:27] workmad3: rails690: plenty of stuff out there on OO design principles (and general software design/software architecture)... again, it doesn't stop you having to think about these things, but it does give you tools and techniques to expand your practice
[14:42:56] nzst: this is a good ruby book for OO design http://www.poodr.com/
[14:45:40] chouhoulis: has joined #RubyOnRails
[14:45:49] zyzioziom: has joined #RubyOnRails
[14:50:06] nzst: rephrasing my question for clarity, Doing a 'rails new' is there any flag I can pass so a gem of my choice ends up in the Gemfile? For example, I'd like the unicorn gem to be initially available in my Gemfile
[14:50:43] matthewd: nzst: Not directly
[14:50:57] matthewd: You can specify a template thing, but that's likely more complexity than you want
[14:51:24] matthewd: The simple option is to --skip-bundle: then you can fix the gemfile as you like before you do the initial bundle install
[14:51:48] centrx: has joined #RubyOnRails
[14:52:07] fsteim: has joined #RubyOnRails
[14:52:29] nzst: alright, I was hoping there'd be an option since it is commented out in the default Gemfile anyway, thanks
[14:53:12] zyzioziom: has joined #RubyOnRails
[14:54:32] drbayer: has joined #RubyOnRails
[14:54:54] matthewd: In 5.0, it's changed to puma, and is uncommented by default
[14:55:03] matthewd: I guess that may or may not help for your situation :)
[14:55:37] nzst: hah, no, but it's something i'll have to keep in mind when I upgrade to v5
[14:55:51] nzst: matthewd: what was the reason for the switch to puma defaults, if you know?
[14:56:49] matthewd: ActionCable: being able to handle concurrent requests by default became much less optional
[14:57:35] neshmi_: has joined #RubyOnRails
[14:57:37] nzst: is unicorn still viable?
[14:57:50] Scient: why shouldn't it be?
[14:58:09] nzst: i can't answer that, i'm asking
[14:58:23] Chachi: has joined #RubyOnRails
[14:58:41] nickjj: nzst, you can run the websocket server in a separate process with actioncable, so you can use whatever you want for the main rails process
[14:58:42] Scient: well you are asking a question, indicating you think unicorn might not be viable anymore
[14:58:42] matthewd: As long as you aren't using a single process (as a standard development environment does) while using Action Cable, then yes
[14:58:59] snowy: has joined #RubyOnRails
[14:59:02] Scient: also actioncables is convoluted and should not be in rails :P
[14:59:15] nzst: hah, first I've heard of it, i'll have to do some reading
[14:59:44] matthewd: Scient: I've heard a lot of things about ACa, but convoluted doesn't seem to be one that really applies... it's actually very straight-forward
[15:00:50] safetypin: has joined #RubyOnRails
[15:00:51] ElFerna_: has joined #RubyOnRails
[15:01:02] darkxploit: has joined #RubyOnRails
[15:01:11] safetypin: has joined #RubyOnRails
[15:01:16] polishdub: has joined #RubyOnRails
[15:01:17] zyzioziom: has joined #RubyOnRails
[15:01:21] nickjj: i've been using websockets with a dedicated faye server in a lot of apps for a long time now, AC's early implementation was pretty bad but it's quite nice now, i will be using it for sure in upcoming projects
[15:01:52] nickjj: as long as you run it in a dedicated process in production
[15:03:39] zyzioziom: has joined #RubyOnRails
[15:08:16] momomomomo: has joined #RubyOnRails
[15:10:21] hobodave: has joined #RubyOnRails
[15:12:01] B1n4r10: has joined #RubyOnRails
[15:13:05] a1fa: is it possible to pass parameters through link_to without them gettting into url as a get method? i did method: :post, but anything passed still goes into the url
[15:13:59] a1fa: maybe :values?
[15:14:11] VeryBewitching: has joined #RubyOnRails
[15:14:15] ravster: nickjj: so there is a dedicated process in production that handles only websockets?
[15:14:27] VeryBewitching: Good morning folks.
[15:14:36] Grundell: has joined #RubyOnRails
[15:15:14] nickjj: ravster, you can choose to run it in embedded mode or as a dedicated process
[15:15:53] nickjj: in development it's handy to embed it, but you could isolate them in dev too if you wanted
[15:17:08] ftj: has joined #RubyOnRails
[15:17:53] truenito: has joined #RubyOnRails
[15:18:45] EdwardIII: hrm not sure if i'm being dumb. i've installed savon to use inside a ruby project, but when i do `require 'savon'` in my controller it says "cannot load such file -- savon"?
[15:19:01] EdwardIII: is this something to do with rails autoloading modules or something? normally on my system this does what i expect
[15:19:05] ElFerna_: has joined #RubyOnRails
[15:19:48] atomical: has joined #RubyOnRails
[15:20:37] EdwardIII: ah, it's because i didn't restart rails server by the look of it
[15:21:33] ddv: EdwardIII: why are you requireing stuff?
[15:22:08] ddv: EdwardIII: also Savon is something you would use in a model
[15:22:19] Pazician: has joined #RubyOnRails
[15:22:34] tubbo: yeah you should almost never need to `require` anything when you're in app/**/*.rb
[15:22:36] nettoweb: has joined #RubyOnRails
[15:22:38] EdwardIII: ddv: yeah i'm just fiddling at the moment, i'll extract it into a separate object soon
[15:23:24] EdwardIII: oh right. is that because of boot.rb's require 'bundler/setup'?
[15:24:02] jsrn_: has joined #RubyOnRails
[15:25:09] EdwardIII: ok, interesting
[15:25:14] tubbo: EdwardIII: if you ever want that same ability in your own apps, you can `require 'bundler/setup'` in a non-rails project
[15:25:24] EdwardIII: i guess it kind of makes sense, you wouldn't install something you don't use
[15:25:35] tubbo: in fact, to achieve rails autoloading, you basically need `require 'bundler/setup'` and to extend ActiveSupport::Autoload in your main module.
[15:25:49] EdwardIII: and it has methods of telling the difference between prod and test deps, so that's all good
[15:26:24] tego101: has joined #RubyOnRails
[15:27:14] EdwardIII: so if i wanted to make a model, like an api client that needs no rails activerecord stuff or db or whatever, can i just drop a ruby file in the models dir? or should i still use the auto generation stuff?
[15:29:08] adavia: has joined #RubyOnRails
[15:29:55] aaronmoodie: has joined #RubyOnRails
[15:30:43] neshmi_: has joined #RubyOnRails
[15:31:37] tubbo: EdwardIII: well there aren't generators for just plain old ruby objects. since app/**/* is auto-loaded, it makes more sense for this code to go in app/
[15:32:03] tubbo: EdwardIII: so if i were you, and i was creating an object to talk to a _service_, i'd put it in app/services/my_api_client.rb, and reference it with MyApiClient as the module/class name.
[15:32:37] EdwardIII: ok cool, that sounds good
[15:36:21] pwnd_nsfw: https://gist.github.com/SirUncleCid/5924c54a22057d53753b
[15:36:28] pwnd_nsfw: Having issues with line 17 passing tests
[15:36:46] pwnd_nsfw: Works in the new action, but not elsewhere
[15:37:03] snowy: has joined #RubyOnRails
[15:37:09] rrawlins: has joined #RubyOnRails
[15:37:21] pwnd_nsfw: I FIGURED IT OUT
[15:37:31] baweaver: has joined #RubyOnRails
[15:37:45] arup_r: what is failing pwnd_nsfw
[15:37:52] arup_r: oh, I see.. cool :)
[15:38:00] pwnd_nsfw: Yeah, two completely different things being tested there...
[15:39:15] sonofdirt: has joined #RubyOnRails
[15:39:23] dopamean_: has joined #RubyOnRails
[15:40:01] arup_r: pwnd_nsfw: In your GitHub avatar I see one calendar and inside the calendar too many Indian gods. But not sure who are they. Can you show me a good full image ? :) I would like to see..
[15:40:13] arup_r: I am an Indian, btw
[15:40:15] a1fa: this is so frustrating, someone correct me on this one
[15:40:20] truenito: has joined #RubyOnRails
[15:40:53] pwnd_nsfw: arup_r, https://www.google.com/search?q=jimi+hendrix+axis+bold+as+love&safe=off&espv=2&biw=1745&bih=877&source=lnms&tbm=isch&sa=X&sqi=2&ved=0ahUKEwiUqJWXtdnKAhXGbSYKHdsUBtoQ_AUIBygC
[15:40:58] pwnd_nsfw: Jimi Hendrix :)
[15:41:03] a1fa: link_to "New", new_model_path, { :data => {:param1 => "whatever",...}, :method => :post, class: "whatever" }
[15:41:36] arup_r: pwnd_nsfw: :( .. insulting.. its ok.
[15:41:38] dangerousdave: has joined #RubyOnRails
[15:41:44] pwnd_nsfw: I get it though
[15:41:53] pwnd_nsfw: a1fa, are you able to post via a link..?
[15:42:09] a1fa: no params are passing
[15:42:17] a1fa: i dont think its even posting
[15:42:19] pwnd_nsfw: probably because method: post doesn't do shit lol
[15:42:23] pwnd_nsfw: it's a link
[15:42:33] a1fa: so i need to to button_to?
[15:42:49] pwnd_nsfw: you need to make a whole form and style the submit button how you want your link to look
[15:43:29] hasitha: has joined #RubyOnRails
[15:44:53] a1fa: i could've sworn i used post in link_to.. now i remember, i actually used onclick=form.submit(0
[15:45:17] a1fa: well that kind of blows
[15:45:38] tubbo: i need to make a task that downloads all logs from the server for a given Rails.env
[15:45:43] tubbo: should i make it a Capistrano task, or a Rake task?
[15:46:01] atomical_: has joined #RubyOnRails
[15:46:28] chouhoulis: has joined #RubyOnRails
[15:47:07] lacrymology: has joined #RubyOnRails
[15:47:24] roshanavand: has joined #RubyOnRails
[15:48:03] EdwardIII: hmm if i want to test this non-model service objecty thingy is it ok to just use Minitest::Assertions ?
[15:48:10] EdwardIII: rather than pull in the whole active machinery?
[15:48:20] chouhoul_: has joined #RubyOnRails
[15:48:29] tubbo: EdwardIII: !try
[15:48:29] helpa: EdwardIII: Why don't you try it and find out for yourself?
[15:48:41] tubbo: fwiw the "active machinery" is probably already "pulled in" by the time you're in the test.
[15:49:44] HenriettaSalt: has joined #RubyOnRails
[15:49:47] roshanavand: Hey guys, I wanna export a html page to pdf in rails, the options that I found are wicked_pdf, pdf_kit, they both are wrappers for wkhtmltopdf command line tool which depends on xorg and bunch of other packages that I don't want to install on the server, is there any better way to do it?
[15:52:26] tubbo: if there is, i certainly haven't heard of one
[15:52:42] tubbo: i know that PDFs are made with PostScript which i believe requires all that Xorg stuff to do the actual drawing
[15:52:54] EdwardIII: tubbo: yep, i tried it, got this error, but i'm not sure if i'm even going in the right direction: test/services/client_test.rb:4:in `test': wrong number of arguments (1 for 2) (ArgumentError)
[15:53:22] EdwardIII: ah that syntax is rails specific
[15:53:49] dionysus69: has joined #RubyOnRails
[15:54:38] EdwardIII: i guess... there's nothing wrong with just using ActiveSupport::TestCase, is there?
[15:55:16] underplank: has joined #RubyOnRails
[15:55:39] rickmasta: has joined #RubyOnRails
[15:55:47] ogpastaling: has joined #RubyOnRails
[15:56:56] jbermudes: roshanavand: I think ghostscript can be compiled without needing X: http://stackoverflow.com/questions/12669415/error-while-building-ghostscript-on-linux#comment17103415_12672365
[15:57:21] jbermudes: But that just gets you the ability to build postscript into PDF
[15:57:38] tubbo: EdwardIII: nope
[15:57:50] tubbo: AS::TestCase will make things a lot easier for you :)
[15:57:55] User458764: has joined #RubyOnRails
[15:57:56] roshanavand: jbermudes: yeah but there is no gem to use it with rails
[15:58:22] jbermudes: roshanavand: you said better, not easier ;)
[15:58:24] Frem: has joined #RubyOnRails
[15:59:12] EdwardIII: i like easier
[16:00:22] jbermudes: It seems you can use wkhtmltopdf with a virtual x server, but that's still installing X to some extent
[16:00:25] EdwardIII: uuuhhhnfh savon is so vastly superior to PHP's soapclient from what i can see
[16:00:55] nzst: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[16:01:02] jbermudes: roshanavand: maybe if you use this you can still use your gems that require wkhtmltopdf: https://github.com/JazzCore/python-pdfkit/wiki/Using-wkhtmltopdf-without-X-server
[16:02:05] pwnd_nsfw: omg, I'm so excited
[16:02:10] pwnd_nsfw: finally getting angular/rails app together
[16:02:13] ogpastaling: has joined #RubyOnRails
[16:02:18] pwnd_nsfw: ACTION might have to fap
[16:02:48] roshanav_: has joined #RubyOnRails
[16:04:36] bauruine: has joined #RubyOnRails
[16:06:08] pwnd_nsfw: does this mean... I can write erb in my angular templates!??!
[16:06:13] pwnd_nsfw: so much easier omg
[16:06:13] k13nox: Hello, in Rails 5 with ActionCable, in ApplicationCable::Channel did we have before_filter method or similar ?
[16:08:18] matthewd: k13nox: You should be able to do what you want in #subscribed
[16:09:15] stannard: has joined #RubyOnRails
[16:10:17] Limix: has joined #RubyOnRails
[16:11:55] k13nox: matthewd: thanks
[16:12:27] aaronmoodie: has joined #RubyOnRails
[16:12:54] worknick: has joined #RubyOnRails
[16:13:25] worknick: how to check <% if @var1 not in @var2 %> in rails view?
[16:14:21] tubbo: worknick: there's a method called `include?` on enumerable collections. http://ruby-doc.org/core-2.3.0/Enumerable.html
[16:15:50] worknick: tubbo: thanks.
[16:17:30] neshmi_: has joined #RubyOnRails
[16:17:49] arup_r: workmad3: there is a method .in? too :p
[16:18:06] cschneid_: has joined #RubyOnRails
[16:18:20] arup_r: http://api.rubyonrails.org/classes/Object.html#method-i-in-3F
[16:18:21] tbuehlmann: guess what, you're both right!
[16:20:09] ferr: has joined #RubyOnRails
[16:20:27] CornishPasty: you get a cookie tubbo
[16:20:32] CornishPasty: And you get a cookie arup_r
[16:21:03] arup_r: ACTION wants to share the cookie with CornishPasty ..
[16:21:17] tubbo: oh ok i see...Object#in? is part of AS, whereas Enumerable#include? is part of Ruby's standard lib
[16:21:20] Rodya_: has joined #RubyOnRails
[16:21:23] CornishPasty: ACTION didn't do anything
[16:21:28] CornishPasty: I deserve no cookie
[16:21:33] disgrntld: has joined #RubyOnRails
[16:22:08] arup_r: tubbo: assuming people who are asking here, working on Rails .. :D
[16:22:23] tubbo: yeah i was just like "hmm why is it not in the ruby docs" haha
[16:22:42] arup_r: yeah.. .in? very readable..
[16:23:48] Rodya_: has joined #RubyOnRails
[16:24:51] arup_r: CornishPasty: I love browser cookie .. :p
[16:27:26] aegis3121: has joined #RubyOnRails
[16:30:37] jimmtt: has joined #RubyOnRails
[16:32:32] jimmtt: I have a view page static_pages/help in which I put [ <%= yield text_2() %>. in app/helpers/static_pages_helper.rb I put a function def text_2()\n return "text2"\nend
[16:32:34] treehug88: has joined #RubyOnRails
[16:32:39] jimmtt: but when I look at the page I just see []
[16:32:41] legohead: has joined #RubyOnRails
[16:32:49] jimmtt: and no errors come up in the server output
[16:33:16] matthewd: jimmtt: Why yield?
[16:33:27] Pumukel: has joined #RubyOnRails
[16:33:39] jimmtt: I don't really know, it seemed unnecessary to me but the guide I'm reading always uses it
[16:34:22] smoitra: has joined #RubyOnRails
[16:35:30] tubbo: jimmtt: definitely not when they call a helper method.
[16:35:33] CocoJumbo: has joined #RubyOnRails
[16:35:41] jimmtt: weird that it works without yield
[16:36:17] roshanavand: has joined #RubyOnRails
[16:36:24] jimmtt: from what I've read about yield it seemed to just be a method that returned what you gave to it, or if there was no argument it returns the default page thing
[16:36:28] tubbo: `yield` is for either calling an implicitly passed-in block on a method. rails overrides it to also allow for `yield :your_content` which can be set by doing `content_for :your_content, 'some content'`.
[16:36:34] CocoJumbo: has joined #RubyOnRails
[16:37:14] jimmtt: in cases of <%= yield :x %> it seemed to work the same just doing <%= x %>
[16:37:15] tubbo: jimmtt: since your method actually returns a String, it's looking for content_for 'text2'.
[16:37:22] arup_r: has joined #RubyOnRails
[16:38:26] adre: has joined #RubyOnRails
[16:40:33] chouhoulis: has joined #RubyOnRails
[16:41:17] rubyonrails079: has joined #RubyOnRails
[16:42:40] ElFerna_: has joined #RubyOnRails
[16:43:49] rubyonrails079: why i can't open settings this irc chat? i use chrome
[16:43:51] Rodya_: has joined #RubyOnRails
[16:46:04] tubbo: rubyonrails079: wat
[16:47:35] srinidhi: has joined #RubyOnRails
[16:47:40] yoongkang: has joined #RubyOnRails
[16:49:15] Andr3as: could anyone take a look at this..? i am trying to load some data for a google chart - https://gist.github.com/awunder/a55eac83f054c98b204e
[16:49:33] Andr3as: however, its telling me "NoMethodError: undefined method `times' for #<String:0x000000063d9608>"
[16:50:15] tubbo: Andr3as: it looks like that code is trying to call `N.times`, where N must be some kind of number. and you're passing in a String.
[16:50:44] Andr3as: when i do the "@stock.daily_prices.pluck(:date, :close).to_json" in the console, its running fine.. just within the add datatable it doesnt like that
[16:51:07] Andr3as: hmm, tubbo
[16:51:29] Ergo: has joined #RubyOnRails
[16:51:50] jacksparrow007: has joined #RubyOnRails
[16:52:22] Andr3as: but why does it work outside the data_table.add_rows and doesnt within it..? any hints?
[16:52:31] kirillzh: has joined #RubyOnRails
[16:52:51] underplank: has joined #RubyOnRails
[16:53:16] flashpoint9: has joined #RubyOnRails
[16:54:12] underplank: Hi all. I have a soft delete Active Record model. Is there a way that I can add a filter of somekind to exclude the soft deleted rows by default?
[16:54:44] _Tariq: has joined #RubyOnRails
[16:54:54] Andr3as: ah, that add_rows calls n.times then.. so how should one do that? with another variable where i should assign the data to?
[16:55:37] Andr3as: hmm, that doesnt work either..
[16:56:34] iateadonut: has joined #RubyOnRails
[16:57:08] arup_r: has joined #RubyOnRails
[16:57:37] Rodya_: has joined #RubyOnRails
[16:58:23] zyzioziom: has joined #RubyOnRails
[16:59:01] agit0: has joined #RubyOnRails
[17:00:06] matthewd: underplank: default_scope will do that, but beware dragons
[17:00:24] matthewd: (also, note there are various soft-delete gems that may be of interest)
[17:01:22] underplank: matthewd: thanks. Am I better just having my own methods to select the stuff I want, rather than overriding inbuild methods?
[17:03:27] jtong: has joined #RubyOnRails
[17:03:37] matthewd: You definitely don't want to start overriding random things. default_scope will do what you want, much less destructively than that... it can just get tricky sometimes in edge cases, where it might apply in places you don't expect/want it to
[17:04:32] matthewd: (of the various things you can do with a default_scope, a 'simple' #where against a column on the current model is amongst the least bad)
[17:05:06] underplank: cool, thanks.
[17:05:53] bronson: has joined #RubyOnRails
[17:06:11] IanMalcolm: has joined #RubyOnRails
[17:07:07] nozpheratu: has joined #RubyOnRails
[17:08:01] spiman: has joined #RubyOnRails
[17:08:13] ramortegui: has joined #RubyOnRails
[17:09:54] snowy: has joined #RubyOnRails
[17:10:30] spiman: hey everyone i had a problem where a deploy on my staging server caused delayedMailer to run two completely unrelated jobs that were in the queue infinitely. After a lot of poking around i realized that that particular commit contained a sidekiq update from 4.0.1 -> 4.1.0 Since i can't have something simlar happen on my production system deploy, anyone have any ideas on how to debug this? i'm using capistrano 2.15 f
[17:10:30] spiman: or deployments
[17:11:04] The_Phoenix: has joined #RubyOnRails
[17:11:05] snowy: has joined #RubyOnRails
[17:11:43] tubbo: spiman: first of all run `git status` so you're aware of implicit version changes in your bundle.
[17:11:48] tubbo: before committing
[17:12:27] tubbo: spiman: to prevent this from happening again, you need to lock down the sidekiq gem version so it can't update past the '4.0' minor version. if your Gemfile said `gem 'sidekiq', ~. '4.0'`, then this wouldn't have happened.
[17:13:49] thebastl: has joined #RubyOnRails
[17:14:02] brycesenz: has joined #RubyOnRails
[17:14:54] spiman: you are right, but this will defer the problem for the person that will decide that sidekiq needs to be updated for whatever reason. What i've thought so far up to now is to quiet the sidekiq queue until i manually check the sidekiq redis queue for any inconsistencies. would that be a plausible solution?
[17:15:10] Zadrel: has joined #RubyOnRails
[17:16:26] tubbo: spiman: you're trying to solve a human idiocy problem with software, and in this case you can't do that. sorry.
[17:16:44] sarink: has joined #RubyOnRails
[17:16:45] underplank: Hi all, Im using the create_table function in active record migrations. I would like to set the default of a timestamp to NULL in postgres. I???ve tried ??? t.timestamp :tombstone, default: nil??? but that doesnt work. Any pointers?
[17:17:05] tubbo: spiman: the next person who decides sidekiq "needs to be updated" will have to manually change the version, `bundle update sidekiq`, and submit a pull request. if y'all can't figure out how to stop bugs from going into prod in that manner, i don't know what to tell you :)
[17:17:30] claytonzaugg: has joined #RubyOnRails
[17:17:33] matthewd: underplank: What default is it ending up with?!
[17:17:39] stannard: has joined #RubyOnRails
[17:17:56] underplank: matthewd: it has no default set on the column.
[17:17:59] tubbo: underplank: `null: true`. pretty sure `t.timestamps` are special attrs, and you most likely want `t.datetime :tombstone`
[17:18:06] matthewd: underplank: So.. null?
[17:18:15] User458764: has joined #RubyOnRails
[17:18:19] ElFerna_: has joined #RubyOnRails
[17:18:20] tubbo: not sure you can use t.timestamps for just any datetime
[17:18:32] _Tariq: has joined #RubyOnRails
[17:18:45] matthewd: tubbo: t.timestamp (no 's') is an alias of datetime
[17:19:05] arup_r: oh .. TIL ^^
[17:19:06] bratsche: has joined #RubyOnRails
[17:19:16] underplank: I dont think not having a default on the column is the same as to being null.
[17:19:28] tubbo: matthewd: that's really confusing.
[17:19:58] tubbo: underplank: it is when the column is created :)
[17:20:16] matthewd: tubbo: I assume for MySQL they're distinct (because of its "special" behaviour for timestamp)
[17:20:19] tubbo: i mean, by definition when you create a column in your table it starts off with NULL fields.
[17:20:59] tubbo: matthewd: i'm going to assume that this is just yet another alias to make things "easier" that was left around in the 2.x days, because 3.x was iirc when `t.timestamps` first appeared.
[17:21:12] tubbo: matthewd: now that both methods exist, it's confusing, but it wasn't ebfore.
[17:21:38] matthewd: tubbo: But MySQL has both, and they mean different things
[17:21:48] tubbo: oh really? mysql has a TIMESTAMP type?
[17:21:52] tubbo: that's pretty neat :)
[17:21:53] matthewd: underplank: Strictly true, but not programmatically observably so
[17:22:19] matthewd: tubbo: Yeah.. it's like datetime, only it gets set to now() if you look at it wrong
[17:22:40] underplank: right. Once you get to active record it probably is nil for a not set column.
[17:23:49] matthewd: underplank: It's null either way in the DB, too
[17:24:38] matthewd: The only way you can tell the difference is to check pg_catalog, where you'll find either an actual null (no default set), or an SQL expression containing null (explicit default null)
[17:24:46] agit0: has joined #RubyOnRails
[17:24:46] tomchapin: has joined #RubyOnRails
[17:26:30] Limix: has joined #RubyOnRails
[17:30:33] Hans267: has joined #RubyOnRails
[17:30:52] justinweiss: has joined #RubyOnRails
[17:32:04] Rodya_: has joined #RubyOnRails
[17:34:04] Andr3as: hmm, i got a little further.. now he complains "ArgumentError: cell value '0.47' is not an Integer, Float or BigDecimal" - which is clearly not the case..
[17:34:46] bmalum: has joined #RubyOnRails
[17:34:55] HenriettaSalt: has joined #RubyOnRails
[17:35:10] chubijs: has joined #RubyOnRails
[17:35:23] Rodya_: has joined #RubyOnRails
[17:35:44] HenriettaSalt: has joined #RubyOnRails
[17:38:16] baweaver: has joined #RubyOnRails
[17:38:28] mostlybadfly: has joined #RubyOnRails
[17:40:44] tubbo: Andr3as: sure it is.
[17:40:56] tubbo: Andr3as: 0.47 is a Float. '0.47' is a String.
[17:42:25] drbayer: has joined #RubyOnRails
[17:42:29] safety_cut: has joined #RubyOnRails
[17:42:38] Andr3as: is there any way to prevent that it is enclosing the numbers with "'" ?
[17:42:58] Rodya_: has joined #RubyOnRails
[17:45:10] shinnya: has joined #RubyOnRails
[17:46:26] Rodya_: has joined #RubyOnRails
[17:46:34] dpsk: has joined #RubyOnRails
[17:46:37] sleungcy: has joined #RubyOnRails
[17:46:55] tubbo: Andr3as: you'd have to find the number that's being represented as a String and run `to_i` on it.
[17:48:23] Andr3as: well, that happenes here data_table.add_rows(@stock.daily_prices.pluck(:date, :close).as_json) - am on something.. will report later
[17:48:31] yoongkang: has joined #RubyOnRails
[17:49:02] cnk: has joined #RubyOnRails
[17:49:45] ElFerna_: has joined #RubyOnRails
[17:49:56] arup_r: or .to_f ?
[17:50:12] Rodya_: has joined #RubyOnRails
[17:50:21] Andr3as: fwiw - https://www.reddit.com/r/rails/comments/2zb7z8/bigdecimal_as_json_if_i_wanted_strings_i_wouldve/ -- you need the activesupport-json_encoder gem and then to configure an initializer with "ActiveSupport.encode_big_decimal_as_string = false"
[17:50:37] Andr3as: or you pros have a better solution..
[17:50:54] IrishGringo: has joined #RubyOnRails
[17:51:47] arup_r: GeorgesLeYeti: o/
[17:52:05] pwnd_nsfw: has joined #RubyOnRails
[17:55:11] emachnic: has joined #RubyOnRails
[17:55:11] hahuang65: has joined #RubyOnRails
[17:56:34] rogue_koder: has joined #RubyOnRails
[17:56:48] xploshioon: has joined #RubyOnRails
[17:57:45] wldcordeiro: has joined #RubyOnRails
[17:58:32] underplank: hm.. When im running my tests, im inserting data into my postgres database. as defined by the database.yml. But if I debug in the middle of my tests, and use psql I cant see any of the data in there. Is this supposed to be the case? or am I doing something wrong?
[17:59:18] tbuehlmann: underplank, it's possible that your tests run within a transaction and your data isn't visible to you from "outside"
[18:00:05] underplank: tbuehlmann: ahh, so rails runs the whole test in a big transaction and rolls back when its done? Is there a way to disable that?
[18:00:30] tbuehlmann: for each example, even. and yes, you can change that somehow
[18:00:40] Pazician: has joined #RubyOnRails
[18:00:55] underplank: ahh.. I think I found it. its an rspec thing.
[18:00:59] tbuehlmann: depending on your test suite, that is
[18:01:00] underplank: thanks for the tip!
[18:01:10] tbuehlmann: right, there it should be `use_transactional_fixtures`
[18:03:27] alex88: has joined #RubyOnRails
[18:04:54] jottr: has joined #RubyOnRails
[18:05:41] drbayer: has joined #RubyOnRails
[18:06:15] seaworthy: has joined #RubyOnRails
[18:06:33] dexter_e: has joined #RubyOnRails
[18:07:32] treehug88: has joined #RubyOnRails
[18:13:19] chouhoulis: has joined #RubyOnRails
[18:13:44] meves: has joined #RubyOnRails
[18:14:01] chouhoulis: has joined #RubyOnRails
[18:14:03] smathy: has joined #RubyOnRails
[18:14:29] akaiiro: has joined #RubyOnRails
[18:16:30] mooru: has joined #RubyOnRails
[18:17:49] TheMoonMaster: has joined #RubyOnRails
[18:18:56] aegis3121: has joined #RubyOnRails
[18:19:42] momomomomo: has joined #RubyOnRails
[18:24:10] snowy: has joined #RubyOnRails
[18:24:40] Rodya_: has joined #RubyOnRails
[18:27:12] Pazician: has joined #RubyOnRails
[18:27:46] Limix: has joined #RubyOnRails
[18:28:12] kitsuneyo: has joined #RubyOnRails
[18:28:37] Sephyros: has joined #RubyOnRails
[18:28:47] nettoweb: has joined #RubyOnRails
[18:29:41] kitsuneyo: general question: what if i want to store just the year in a date field? should i just make a separate integer column to handle that?
[18:30:17] borodin: has joined #RubyOnRails
[18:32:07] mag42c: has joined #RubyOnRails
[18:32:46] Pazician: has joined #RubyOnRails
[18:33:36] baweaver: has joined #RubyOnRails
[18:34:09] pramsky: has joined #RubyOnRails
[18:34:38] Sephyros: I have a ruby question, look at this: https://gist.github.com/Sephyros/abb74ed46369720c205a
[18:35:39] tbuehlmann: Sephyros, you are not calling the thing_to_repeat
[18:36:07] adaedra: More precisely, you're calling bark before even entering repeater.
[18:36:20] adaedra: And pass bark return value to repeater.
[18:36:30] adaedra: Methods are not first class objects.
[18:36:33] baweaver: has joined #RubyOnRails
[18:37:01] adaedra: If you want to pass a method, you have to get a method object using Object#method and call it with #call.
[18:37:07] Psy-Q: has joined #RubyOnRails
[18:38:12] roshanavand: has joined #RubyOnRails
[18:38:24] solars: has joined #RubyOnRails
[18:39:23] mdw: has joined #RubyOnRails
[18:39:29] mooru: has joined #RubyOnRails
[18:40:18] User458764: has joined #RubyOnRails
[18:41:01] xardion: has joined #RubyOnRails
[18:41:05] drbayer: has joined #RubyOnRails
[18:42:10] srinidhi: has joined #RubyOnRails
[18:43:55] atomical: has joined #RubyOnRails
[18:44:46] Rubie: has joined #RubyOnRails
[18:45:41] IanMalcolm: has joined #RubyOnRails
[18:46:07] drbayer: has joined #RubyOnRails
[18:48:50] jottr_: has joined #RubyOnRails
[18:50:04] HenriettaSalt: has joined #RubyOnRails
[18:50:47] ferr: has joined #RubyOnRails
[18:50:57] HenriettaSalt: has joined #RubyOnRails
[18:51:17] quazimodo: has joined #RubyOnRails
[18:51:18] quazimod1: has joined #RubyOnRails
[18:51:34] jtong_: has joined #RubyOnRails
[18:55:13] claytonzaugg: has joined #RubyOnRails
[18:55:36] dionysus69: has joined #RubyOnRails
[18:55:40] roshanavand: has joined #RubyOnRails
[18:57:30] Rodya_: has joined #RubyOnRails
[18:58:49] Swappticon: has joined #RubyOnRails
[19:00:03] mary5030: has joined #RubyOnRails
[19:00:12] aegis3121: has joined #RubyOnRails
[19:00:23] dstarh: has joined #RubyOnRails
[19:00:33] sleungcy: has joined #RubyOnRails
[19:01:09] dstarh: Is there any way to force Capistrano 3 to do an upload even if the file already exists on the remote server? the upload! task checks unless test [ -f filename]
[19:01:22] kitsuneyo: anyone use this partial-date gem?? https://github.com/58bits/partial-date
[19:02:51] chouhoul_: has joined #RubyOnRails
[19:02:53] smathy: kitsuneyo, !used
[19:02:53] helpa: kitsuneyo: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[19:03:15] alex88_: has joined #RubyOnRails
[19:03:17] pramodv__: has joined #RubyOnRails
[19:03:18] dopamean1: has joined #RubyOnRails
[19:03:21] kitsuneyo: i already stated my problem smathy but nobody answered
[19:03:22] Axy: has joined #RubyOnRails
[19:03:50] smathy: kitsuneyo, doesn't change the advice.
[19:03:55] kitsuneyo: i'm looking for a solution myself and found that gem
[19:04:02] smathy: kitsuneyo, re your first question, if you wanted to store just a year I'd store it as either integer or string.
[19:04:10] uxp_: has joined #RubyOnRails
[19:05:01] ebryn_: has joined #RubyOnRails
[19:05:06] kitsuneyo: i'm storing birth dates, but in some cases only the year is known.
[19:05:23] kitsuneyo: i found some potential solutions here: http://stackoverflow.com/questions/90246/how-would-i-store-a-date-that-can-be-partial-i-e-just-the-year-maybe-the-mont
[19:06:09] dstarh: I'm partial to integer yyyymmdd columns myself, if I need to store something and I don't know the year I store them as 20160101
[19:06:17] kitsuneyo: i could have an extra column for just the year, but it would make sorting the data a bit trickier i guess
[19:06:21] webhat_: has joined #RubyOnRails
[19:06:23] jbermudes_: has joined #RubyOnRails
[19:06:23] jbermudes_: has joined #RubyOnRails
[19:06:50] kitsuneyo: how do you tell the difference between a full 1st jan date and one where you don't know the full date?
[19:07:06] sungji: has joined #RubyOnRails
[19:07:14] livcd_: has joined #RubyOnRails
[19:07:18] dstarh: does that matter to your codebase?
[19:07:19] workmad3: kitsuneyo: I'd be tempted to actually store that as e.g. 20160000
[19:07:26] sunya7a_: has joined #RubyOnRails
[19:07:26] mooru: has joined #RubyOnRails
[19:07:40] dstarh: workmad3 that'd be a good workaround
[19:07:43] hendrici1s: has joined #RubyOnRails
[19:07:49] kitsuneyo: dstarh, yes
[19:07:52] Wobni: has joined #RubyOnRails
[19:07:55] hahuang65: has joined #RubyOnRails
[19:07:56] fluxsour1e: has joined #RubyOnRails
[19:07:58] kitsuneyo: workmad3, not a bad idea
[19:07:58] workmad3: use full zeros for 'unknown' :) also lets you do 20160100 for a known year and month but no known day
[19:08:01] ltd_: has joined #RubyOnRails
[19:08:05] dstarh: then I'd go with something like what workmad3 said
[19:08:11] Swappticon: has joined #RubyOnRails
[19:08:23] pilne: has joined #RubyOnRails
[19:08:24] kitsuneyo: what do i lose by not using the date column-type?
[19:08:30] dstarh: yyyymmdd columns are great because they sort naturally
[19:08:43] dstarh: you lose date math in the DB
[19:08:45] jmfurlott: has joined #RubyOnRails
[19:08:50] workmad3: kitsuneyo: validation, automatic conversion in rails, etc.
[19:09:00] jmfurlott: has left #RubyOnRails: ()
[19:09:11] workmad3: and yeah, some date math (although that stuff is always dubious if you don't have timezone data anyway)
[19:09:21] atomical_: has joined #RubyOnRails
[19:09:51] workmad3: those date calculations would probably need to be redone to handle partial dates anyway though
[19:10:02] kitsuneyo: this sounds kind of interesting: http://stackoverflow.com/questions/90246/how-would-i-store-a-date-that-can-be-partial-i-e-just-the-year-maybe-the-mont#90273
[19:10:02] dstarh: we like it because we lose the ambiguity, whatever date is there is the date in that users timezone and then we don't have to store every date in our system with the timezone
[19:10:11] workmad3: so not sure you're losing anything you wouldn't need to handle :)
[19:10:21] safety_cut: has joined #RubyOnRails
[19:10:31] beingjohnm_: has joined #RubyOnRails
[19:10:48] Fire-Dragon-DoL-: has joined #RubyOnRails
[19:10:50] kadoppe_: has joined #RubyOnRails
[19:10:57] AntiSpamMeta: has joined #RubyOnRails
[19:10:59] abracadaniel: has joined #RubyOnRails
[19:11:01] Gizmokid2010: has joined #RubyOnRails
[19:11:02] Haydos_: has joined #RubyOnRails
[19:11:02] D9-: has joined #RubyOnRails
[19:11:04] greenhat|: has joined #RubyOnRails
[19:11:06] workmad3: dstarh: ambiguity in timezones comes in if you try to perform calculations more than just storage ;)
[19:11:09] joelsmith: has joined #RubyOnRails
[19:11:12] Ankhers_: has joined #RubyOnRails
[19:11:12] xMopxShe-: has joined #RubyOnRails
[19:11:14] shamanime_: has joined #RubyOnRails
[19:11:14] swav_: has joined #RubyOnRails
[19:11:23] hfp__work: has joined #RubyOnRails
[19:11:23] dstarh: workmad3 yea
[19:11:38] davidcelis_: has joined #RubyOnRails
[19:11:40] russt_: has joined #RubyOnRails
[19:11:42] beingjohnm_: has joined #RubyOnRails
[19:11:49] kitsuneyo: workmad3, think i can use the integer method with a date_select field fairly easily?
[19:11:51] bakingbread: has joined #RubyOnRails
[19:11:59] pawnbox: has joined #RubyOnRails
[19:12:09] M-shine1: has joined #RubyOnRails
[19:12:19] crazyphil: has joined #RubyOnRails
[19:12:30] armyriad: has joined #RubyOnRails
[19:12:44] Denarii: has joined #RubyOnRails
[19:12:52] segy: has joined #RubyOnRails
[19:13:12] baweaver: has joined #RubyOnRails
[19:13:38] workmad3: kitsuneyo: possibly... you'd need to try it out
[19:13:39] Swappticon: has joined #RubyOnRails
[19:13:52] Swappticon: has left #RubyOnRails: ()
[19:13:52] matthewd: has joined #RubyOnRails
[19:14:13] Psyq: has joined #RubyOnRails
[19:14:15] workmad3: dstarh: I basically distrust any calculations done on dates or times without full timezone awareness (and I'm talking the timezone in the sense of `Europe/London`, not just an offset) :)
[19:14:21] atomical: has joined #RubyOnRails
[19:14:40] rarruda: has joined #RubyOnRails
[19:14:43] k13nox: has joined #RubyOnRails
[19:14:54] shaman42: has joined #RubyOnRails
[19:14:56] workmad3: if you're not doing calculations, all's good though
[19:15:09] rogue_koder: has joined #RubyOnRails
[19:15:29] dmz: has joined #RubyOnRails
[19:15:39] meves: has joined #RubyOnRails
[19:15:46] royvandermeij: has joined #RubyOnRails
[19:16:05] confact: has joined #RubyOnRails
[19:16:24] brycesenz: has joined #RubyOnRails
[19:16:27] dextertzu: has joined #RubyOnRails
[19:16:53] davidcelis_: has left #RubyOnRails: ()
[19:17:06] davidcelis: has joined #RubyOnRails
[19:17:10] kitsuneyo: if i just had a regular date column, plus a year integer column that auto-sets when the date column is set, i could still sort any collection pretty easily by sorting by the year col first, then the date col
[19:17:29] mickey_mouse_2: has joined #RubyOnRails
[19:17:50] manfrin: has joined #RubyOnRails
[19:17:50] kitsuneyo: then i just have to let users choose whether to enter a full date or just the year
[19:18:34] safetypin: has joined #RubyOnRails
[19:18:51] safety_cut: has joined #RubyOnRails
[19:19:55] smathy: It's an unusual requirement.
[19:19:59] mooru: has joined #RubyOnRails
[19:20:08] drbayer: has joined #RubyOnRails
[19:21:07] pwnd_nsfw: has joined #RubyOnRails
[19:21:17] dstarh: so anyone have any ideas about forcing the capistrano upload! task?
[19:21:24] dstarh: besides writing my own
[19:22:03] cnk: what do you mean "forcing"
[19:22:11] kitsuneyo: smathy you think? i thought it would be pretty common for anyone cataloging historical dates
[19:22:35] ftj: has joined #RubyOnRails
[19:23:02] tubbo: kitsuneyo: it is, but most people don't catalog historical dates ;)
[19:23:14] smathy: kitsuneyo, I don't know what "cataloging historical dates" means, but *THAT* seems unusual too.
[19:23:40] kitsuneyo: lol ok... well at least my project is somewhat original then
[19:24:24] Synthead: has joined #RubyOnRails
[19:24:43] smathy: Aren't there some historical dates where you know just the year and month?
[19:24:51] theery: has joined #RubyOnRails
[19:24:53] snowy: has joined #RubyOnRails
[19:25:14] smathy: ...and some where you know the year/month/day/hour and others the minute too, and some maybe the second too?
[19:25:18] cnk: Right. And I think that is why MySQL's date column allows partial dates
[19:25:33] brendan-: has joined #RubyOnRails
[19:26:24] smathy: cnk, no way to represent zero month or day in Ruby - or rather, no way to differentiate that from something that actually happened at midnight on 1/1
[19:26:26] dstarh: cnk it's not seeming to upload the file if the file already exists @ the remote location
[19:27:04] weaksauce: has joined #RubyOnRails
[19:27:28] brendan-: has joined #RubyOnRails
[19:27:41] cnk: smathy: Yup. I didn't say it worked all the way through from db -> app
[19:28:12] pramodv__: has left #RubyOnRails: ()
[19:28:18] kitsuneyo: smathy, i can live with either the full date or the year
[19:28:28] smathy: cnk, yeah, just makes the DB feature not really any more useful than a YYYYMMDD string.
[19:28:42] kitsuneyo: time isn't important here at all :)
[19:28:59] smathy: kitsuneyo, gotcha, just thinking that if the others were required then that would definitely tip the scales in favor of the string.
[19:29:11] pramsky: has joined #RubyOnRails
[19:30:11] rrawlins: has joined #RubyOnRails
[19:30:18] zyzioziom: has joined #RubyOnRails
[19:30:23] kitsuneyo: what is the general term for the roman alphabet, greek, chinese and so on? it's not alphabet since chinese isn't an alphabet exactly
[19:30:35] srinidhi: has joined #RubyOnRails
[19:30:50] [Butch]: has joined #RubyOnRails
[19:31:23] kitsuneyo: i guess it's... writing system?
[19:34:07] snowy: has joined #RubyOnRails
[19:34:29] jtong: has joined #RubyOnRails
[19:36:42] jtong_: has joined #RubyOnRails
[19:39:03] lemur: has joined #RubyOnRails
[19:39:35] tubbo: kitsuneyo: character set.
[19:39:49] tubbo: kitsuneyo: but yeah, "alphabet" is basically the term
[19:40:38] kitsuneyo: tubbo, i thought charset was more to do with encoding like ASCII, unicode and so on
[19:40:39] PedramT: has joined #RubyOnRails
[19:40:52] Polymorphism: has joined #RubyOnRails
[19:40:58] tubbo: yeah i think you're right there :)
[19:41:12] tubbo: kitsuneyo: i dunno, i always call it "the roman alphabet", "the cyrillic alphabet", "the chinese alphabet"
[19:41:28] drbayer: has joined #RubyOnRails
[19:41:30] tubbo: even though the asian language characters aren't really "letters".
[19:41:54] kitsuneyo: yeah that's what i would say in conversation too
[19:42:06] kitsuneyo: i guess there isn't a more accurate short word for it
[19:42:43] kitsuneyo: writing system sounds lame
[19:44:59] claytonzaugg: has joined #RubyOnRails
[19:45:03] bratsche_: has joined #RubyOnRails
[19:48:03] philtr_: has joined #RubyOnRails
[19:48:58] magic_: has joined #RubyOnRails
[19:48:58] Guest4184______: has joined #RubyOnRails
[19:49:05] beingjohnm_: has joined #RubyOnRails
[19:49:06] stannard_: has joined #RubyOnRails
[19:49:07] yoongkang: has joined #RubyOnRails
[19:49:25] icedp: has joined #RubyOnRails
[19:49:27] meoblast001: has joined #RubyOnRails
[19:49:56] alex88: has joined #RubyOnRails
[19:50:00] kaspergrubbe: has joined #RubyOnRails
[19:50:12] frem_: has joined #RubyOnRails
[19:51:07] russt: has joined #RubyOnRails
[19:51:50] beingjohnm_: has joined #RubyOnRails
[19:52:41] kitsuneyo: what happens when you sort a collection of names by last_name then first_name, but last_name is missing in some records? do the all the names without a last_name go to the end?
[19:52:48] drbayer: has joined #RubyOnRails
[19:53:18] juddey: has joined #RubyOnRails
[19:53:51] serbalgi: has joined #RubyOnRails
[19:53:55] akaiiro: has joined #RubyOnRails
[19:55:59] underplank: has joined #RubyOnRails
[19:56:16] ashishjain: has joined #RubyOnRails
[19:57:04] ashishjain: I am extremely newbie on rubyonrails
[19:57:27] yfeldblum: has joined #RubyOnRails
[19:57:39] ashishjain: I am running a rest call to a service implemented using ruby
[19:58:07] Psyq: has joined #RubyOnRails
[19:58:18] ashishjain: I see the following error "Can't verify CSRF token authenticity"
[19:58:38] pwnd_nsfw: has joined #RubyOnRails
[19:58:52] ashishjain: How can I set a authenticity token for such an application in my http request
[19:59:47] bauruine: has joined #RubyOnRails
[20:00:34] boboc: has joined #RubyOnRails
[20:01:02] safetypin: has joined #RubyOnRails
[20:01:18] stannard: has joined #RubyOnRails
[20:04:04] tubbo: ashishjain: the authenticity token is for taking in form data from a site, and is meant to protect against cross-site scripting. in a JSON (or XML) API, this problem doesn't exist. so you need to skip checking for an authenticity token on any HTTP request for JSON/XML resources.
[20:04:26] tubbo: ashishjain: like this: `skip_before_action :verify_authenticity_token, if: :api_request?`
[20:04:34] smathy: kitsuneyo, end or start depending on where NULL is sorted.
[20:04:51] tubbo: where api_request? is defined as `params[:format] == 'json'` or something.
[20:04:57] kitsuneyo: ok thanks smathy
[20:05:07] kitsuneyo: seeyas later
[20:05:37] dopie: has joined #RubyOnRails
[20:05:46] pwnd_nsfw: I'm having trouble figuring out how to get any url that doesn't include '/api' to redirect to a certain action
[20:06:02] nettoweb: has joined #RubyOnRails
[20:06:29] pwnd_nsfw: I see that constraints can be a thing, but not sure how I would include all routes described in a simple way
[20:06:55] pwnd_nsfw: get '*path' => 'application#index' would redirect everything
[20:06:58] smathy: kitsuneyo, and FWIW, a script (eg. Latin/Romain script or cyrillic script) is a collection of letters, and then an alphabet will be a regional subset of those letters. So it's the cyrillic script, but then the russian alphabet (which uses the cyrillic script).
[20:07:35] hasitha: has joined #RubyOnRails
[20:08:09] safety_cut: has joined #RubyOnRails
[20:09:23] legohead: has joined #RubyOnRails
[20:10:46] smathy: pwnd_nsfw, I'm assuming you're misusing "redirect" there, you're just talking about route mapping right?
[20:11:02] pwnd_nsfw: I have angular built on top of my app
[20:11:21] pwnd_nsfw: So, I want all non api calls to be redirected to the angular bit
[20:12:14] pwnd_nsfw: s/redirected/routed
[20:12:49] matthewd: pwnd_nsfw: I think you need to describe what is happening, and how it differs from what you want
[20:12:50] pwnd_nsfw: globbing would work great if there's a NOT symbol
[20:13:01] xploshioon: has joined #RubyOnRails
[20:13:03] Ripins: has joined #RubyOnRails
[20:13:12] matthewd: routes are evaluated in order..
[20:13:21] adac: has joined #RubyOnRails
[20:13:23] adac: "Model.all.each" how can i break that down into smaller steps like get all but first the first 50000 first, then the next 50000 and so one. Is there a method to do that or has this to be done manually?
[20:13:56] pwnd_nsfw: What is happening: if I go to, say, '/login', it doesn't use the angular app. if I load up the index, where the angular app currently works, and I click on a link that goes to '/login' it uses the angular routes, thus working correctly
[20:15:08] tubbo: pwnd_nsfw: can't you constrain your routes to only be routed for JSON requests?
[20:15:25] pwnd_nsfw: That's not really what I'm asking, but yes
[20:15:28] tubbo: you *do* want to redirect all HTML routing to application#index, right?
[20:15:40] tubbo: pwnd_nsfw: that's a better solution than going on a wild goose chase for a NOT symbol in the glob ;)
[20:15:45] matthewd: pwnd_nsfw: You just labelled "it doesn't [..]" as "what is happening". That's what is *not* happening.
[20:15:46] tubbo: because it doesn't exist AFIAK
[20:16:03] meves: has joined #RubyOnRails
[20:16:07] tubbo: adac: in_groups_of IIRC
[20:16:21] pwnd_nsfw: ..... it doesn't is what is a mixture of what I want and what is happening lol
[20:16:56] pwnd_nsfw: /login will try use rails routing
[20:17:01] pwnd_nsfw: what is happening ^
[20:17:10] pwnd_nsfw: what I want to happen: /login to use angular routing
[20:17:26] roshanavand: has joined #RubyOnRails
[20:17:33] tubbo: pwnd_nsfw: so your problem really is that /login has been routed in rails to go to a given html route
[20:17:39] tubbo: and you don't want html requests to be routed at all
[20:17:49] jmophi: has joined #RubyOnRails
[20:18:02] matthewd: pwnd_nsfw: Describe what you see in your browser when it "try use rails routing"
[20:18:22] matthewd: pwnd_nsfw: Because I don't see why your described glob isn't doing what you seem to want
[20:18:22] jmophi: Is it appropriate to render views on top of an app that is meant to be used primarily as an API?
[20:18:24] pwnd_nsfw: "No route matches [GET] "/login"
[20:18:32] _Tariq: has joined #RubyOnRails
[20:18:42] matthewd: .. with the glob route in there?
[20:18:48] robbyoconnor: has joined #RubyOnRails
[20:18:50] pwnd_nsfw: No, it routes to the angular app
[20:18:55] pwnd_nsfw: API calls do not get routed correctly then
[20:19:02] rhizome: jmophi: what do you mean, "on top of?"
[20:19:04] pwnd_nsfw: even if the glob is defined above the rest of the routes
[20:19:19] matthewd: above is exactly where you don't want it
[20:20:10] pwnd_nsfw: matthewd, sexy, thanks for working that out with me
[20:20:12] pwnd_nsfw: you too tubbo
[20:20:24] rhizome: adac: find_in_batches
[20:20:33] User458764: has joined #RubyOnRails
[20:20:34] pwnd_nsfw: I have no excuse for what was going on in my brain to assume that was correct heh
[20:21:02] ravster: has joined #RubyOnRails
[20:21:54] FernandoBasso: has joined #RubyOnRails
[20:23:16] robbyoconnor: has joined #RubyOnRails
[20:23:40] aegis3121: has joined #RubyOnRails
[20:23:45] jmophi: rhizome: i have an app that is meant to be used mostly as a json api by other apps but i want to provide a ui to the api as well for interacting with the api manually. does it make sense to mix them together?
[20:25:18] mdw: has joined #RubyOnRails
[20:25:24] ferr: has joined #RubyOnRails
[20:26:37] underplank: has joined #RubyOnRails
[20:28:23] mwlang: has joined #RubyOnRails
[20:28:27] DoubleMalt: has joined #RubyOnRails
[20:29:49] mwlang: I have a Rails 4 app configured to send emails via ActionMailer directly to smtp.office365.com via :smtp and it???s timing out before completing the delivery. How can I increase the timeout wait for :smtp?
[20:30:50] mwlang: specifically, ???ERROR: Net::OpenTimeout: execution expired??? error.
[20:31:27] adac: tubbo, rhizome thanks!
[20:31:48] ur5us: has joined #RubyOnRails
[20:32:23] ftj: has joined #RubyOnRails
[20:33:33] Pazician: has joined #RubyOnRails
[20:34:45] smathy: mwlang, always? Or occasionally?
[20:35:00] mwlang: smathy: about 4 in 50 attempts.
[20:35:04] baweaver: has joined #RubyOnRails
[20:36:15] smathy: mwlang, ok, so really this is what queuing systems like Sidekiq are built for, it'll requeue a failure and retry it.
[20:36:51] matthewd: Yeah... possibly non-trivial but "easy" solution: upgrade to 4.2 and use ActiveJob to do the delivery in the background
[20:37:02] mwlang: smathy: yeah, that???s what I???m suggesting to my client, but he really wants to try simply increasing timeout wait first.
[20:38:51] miles: has joined #RubyOnRails
[20:39:51] baweaver: has joined #RubyOnRails
[20:40:06] ferr: How would I loop through gon items in my javascript code? https://gist.github.com/Fercell/284dc388ccdc4d5167fe
[20:40:19] lemur: has joined #RubyOnRails
[20:40:27] ^CrYpto^: has joined #RubyOnRails
[20:40:45] k13nox: has joined #RubyOnRails
[20:41:39] sandstrom: has joined #RubyOnRails
[20:42:26] DEA7TH: has joined #RubyOnRails
[20:42:29] centrx: for loop?
[20:43:32] DEA7TH: Is there a better way to write this? min_charge_applied = not svc.find_by(service_id: id).nil?
[20:43:47] DEA7TH: like replace find_by with something else
[20:44:14] ftj: has joined #RubyOnRails
[20:44:21] workmad3: DEA7TH: what are you trying to find?
[20:44:58] DEA7TH: workmad3: Finding out whether there is at least one record with a certain attribute
[20:44:58] matthewd: svc.where(service_id: nil).exists?
[20:45:06] smathy: mwlang, the open_timeout is 30 seconds, your client doesn't know what they're asking when they're asking to increase that.
[20:45:14] workmad3: DEA7TH: then `svr.where(service_id: id).exists?`
[20:45:17] matthewd: (but why would something called 'svc' have an attribute called 'service_id'?) :/
[20:45:28] safetypin: has joined #RubyOnRails
[20:45:30] DEA7TH: is it ok to use where if I need just a single result?
[20:45:46] workmad3: DEA7TH: you don't need any result, you just need to know if that result exists
[20:45:48] DEA7TH: it's not svc, it's booking_service (or bs) but I didn't want to use that
[20:45:59] matthewd: Oops.. how did I get a nil in there
[20:46:00] mwlang: smathy: where???s the documentation on that???would help to give client links to read himself.
[20:46:13] smathy: mwlang, and increasing it is extremely unlikely to help, if a socket can't be opened in 30 seconds, it's really unlikely to ever be.
[20:46:16] FCser: has joined #RubyOnRails
[20:46:22] mwlang: the other option I like to employ is local install of postfix and exim4 and use local :sendmail
[20:46:24] smathy: mwlang, in Net::SMTP
[20:46:44] smathy: mwlang, right, basically installing a queuing system.
[20:47:33] stannard: has joined #RubyOnRails
[20:47:34] smathy: ...only thing is that your local MTA is only going to be able to enqueue/retry email sending, whereas Sidekiq can enqueue/retry much more.
[20:47:35] aegis3121: has joined #RubyOnRails
[20:47:47] workmad3: matthewd: because the original was doing nil checks :)
[20:47:53] workmad3: matthewd: and had a `not`
[20:49:00] blackmesa: has joined #RubyOnRails
[20:49:23] mwlang: smathy: I???m aware.
[20:49:24] _Tariq: has joined #RubyOnRails
[20:49:57] smathy: mwlang, ok. You aware that getting Sidekiq up and running is (a) installing redis and (b) a Gemfile addition.
[20:50:22] mwlang: smathy: yeah, done it plenty of time for other clients.
[20:50:50] mwlang: trying to convince this one it???s not a bad thing to use established tools rather than hacking something in order to keep gem and system dependencies down.
[20:51:18] segy: has joined #RubyOnRails
[20:51:28] meves: has joined #RubyOnRails
[20:51:35] smathy: Just that if you get the go-ahead for installing an MTA, I mean that's MUCH heavier than local redis.
[20:53:11] mwlang: smathy: I believe it. Sometimes you get a client (as this one is) that???s coming from Ruby 1.8.6 and remembers all the horrors of maintaining gems and system dependencies prior to bundler and it???s just a series of baby steps to get them to the new age way of doing things.
[20:53:31] smathy: Yep, understood.
[20:54:20] Jasaka: has joined #RubyOnRails
[20:54:39] mary5030: has joined #RubyOnRails
[20:55:33] serbalgi: has joined #RubyOnRails
[20:55:43] Oliphaunte: has joined #RubyOnRails
[20:55:48] alaing: has joined #RubyOnRails
[20:56:00] alaing: has joined #RubyOnRails
[20:56:06] alaing: good evening
[20:57:11] ziyadb: has joined #RubyOnRails
[20:57:20] alaing: I've got an variable that contains a bunch or rows returned by activerecord. how do I get one of the columns values and populate it into a hash which i could later use as a html data attribute
[20:57:31] alaing: bunch of rows ^
[20:58:38] Papierkorb: alaing: how did you retrieve the rows?
[20:59:04] atomical_: has joined #RubyOnRails
[20:59:23] miles: has joined #RubyOnRails
[20:59:40] kirillzh: has joined #RubyOnRails
[21:00:39] alaing: Papierkorb: @offence_descriptions = Offence.unique_name.order(description: :asc)
[21:01:02] ftj: has joined #RubyOnRails
[21:01:05] kirillzh: has joined #RubyOnRails
[21:01:21] pawnbox: has joined #RubyOnRails
[21:01:33] alaing: Papierkorb: I would like to get Offence.description
[21:02:00] fryguy: i'm trying to safely stop resque workers such that they finish what they werre working on. Resque documentation says to use SIGQUIT for this, but using SIGQUIT causes it to immediately die, and SIGTERM does what I want. Is the resque documentation just wrong, or am I missing some detail?
[21:03:10] alaing: Papierkorb: actually I just need to output it as a javascript array in an html data attribute
[21:05:18] matthewd: alaing: pluck
[21:06:12] pulpfiction: has joined #RubyOnRails
[21:06:29] alaing: matthewd: would i need to escape it for js usage?
[21:06:32] pulpfiction: i'm new to ruby. do i need to call .new on classes? i mean, is this a bug or a normal code? @resolver = resolver || RemoteResolver.new(persona_id, client: Bio::ACL::Client)
[21:06:57] diegoviola: has joined #RubyOnRails
[21:07:11] pulpfiction: (i'm wondering if this was supposed to be Bio::ACL::Client.new)
[21:07:27] matthewd: alaing: Yes, then you'll probably want .to_json
[21:07:33] bronson: has joined #RubyOnRails
[21:07:54] alaing: matthewd: thanks I'll try that
[21:08:12] matthewd: pulpfiction: You only need to call .new if you want an instance; that may well intend to pass a reference to the class itself
[21:08:45] pulpfiction: matthewd, on the Client class, the initialize is: def initialize(persona_id, client: Bio::ACL::Client.new)
[21:09:00] pulpfiction: that's why i'm inclined to think this might be a bug
[21:09:17] matthewd: Is it working? :)
[21:09:32] mary5030: has joined #RubyOnRails
[21:09:59] rickmasta: has joined #RubyOnRails
[21:10:03] tubbo: pulpfiction: we can't possibly know the answer to this.
[21:10:12] legohead: has joined #RubyOnRails
[21:10:19] pulpfiction: the code is always passing the resolver, i guess
[21:10:22] tubbo: pulpfiction: `client:` could be setting a class constant or it could be an instance of a client.
[21:11:25] shmilan: has joined #RubyOnRails
[21:12:00] manfrin`_: has joined #RubyOnRails
[21:12:22] pulpfiction: i see. but on the initialize the default value receives a new instance. the rest of the class does not initialize anything but uses the client as it was already an instance
[21:13:26] alaing: matthewd: thanks that working. I was hoping to link it up to some jquery ui autocomplete widget :-)
[21:13:40] tubbo: pulpfiction: right, so then it's a bug. `.new` on that class will create an instance.
[21:14:20] pulpfiction: tubbo, ok, thanks for the explanation
[21:14:28] pulpfiction: will forward the bug to the author
[21:15:03] mary5030: has joined #RubyOnRails
[21:16:03] nettoweb: has joined #RubyOnRails
[21:16:54] _Tariq: has joined #RubyOnRails
[21:17:41] jgt1: has joined #RubyOnRails
[21:18:57] shmilan: has joined #RubyOnRails
[21:20:58] wethu: has joined #RubyOnRails
[21:24:10] shmilan: has joined #RubyOnRails
[21:25:49] FooMunki: has joined #RubyOnRails
[21:26:01] baweaver: has joined #RubyOnRails
[21:27:30] Toledo|gone: has left #RubyOnRails: ()
[21:29:42] ElFerna_: has joined #RubyOnRails
[21:30:29] Yeomra: has joined #RubyOnRails
[21:31:03] rrawlins: has joined #RubyOnRails
[21:33:34] jacksparrow007: has joined #RubyOnRails
[21:36:38] alaing: I'm having problems with = f.text_field :offence_category, :description, data: { source: @offence_descriptions.pluck('description').to_json }
[21:36:50] alaing: complaining about 3 arguements instead of 2
[21:37:06] Pazician: has joined #RubyOnRails
[21:37:46] alaing: but if it remove :description i get undefined method `offence_category' for #<Claim:0x007fabaea73350>
[21:38:16] djbkd: has joined #RubyOnRails
[21:40:59] claytonzaugg: has joined #RubyOnRails
[21:41:00] Pazician: has joined #RubyOnRails
[21:42:28] brycesenz: has joined #RubyOnRails
[21:43:13] centrx: Try using parentheses?
[21:43:56] solars: has joined #RubyOnRails
[21:44:19] herpless: has joined #RubyOnRails
[21:44:20] atomical: has joined #RubyOnRails
[21:44:49] Cohedrin: has joined #RubyOnRails
[21:47:05] Cervajz: has joined #RubyOnRails
[21:47:54] ravster: has joined #RubyOnRails
[21:47:59] bbrowning: has joined #RubyOnRails
[21:49:58] yoongkang: has joined #RubyOnRails
[21:51:04] pawnbox: has joined #RubyOnRails
[21:51:47] pulpfiction: how do i create a multiline block on an assignment? for instance: @var ||= ... code \n ... code \n .. code \n return value for @var
[21:51:52] mag42c: has left #RubyOnRails: ()
[21:52:24] centrx: pulpfiction, use begin and end
[21:52:30] centrx: @var ||= begin
[21:52:49] pulpfiction: centrx, ok. i googled that, but the results mentioning rescue confused me. thanks!
[21:53:10] rogue_koder: has joined #RubyOnRails
[21:54:16] Pazician: has joined #RubyOnRails
[21:58:06] manfrin_: has joined #RubyOnRails
[21:58:41] rogue_koder: has joined #RubyOnRails
[21:59:00] madebymarkca: has joined #RubyOnRails
[22:00:42] atomical_: has joined #RubyOnRails
[22:01:02] jmfurlott: has joined #RubyOnRails
[22:01:22] moeabdol1: has joined #RubyOnRails
[22:01:29] mary5030_: has joined #RubyOnRails
[22:01:39] Limix: has joined #RubyOnRails
[22:02:10] mary5030_: has joined #RubyOnRails
[22:02:53] k13nox: has joined #RubyOnRails
[22:05:52] meves: has joined #RubyOnRails
[22:06:39] mary5030: has joined #RubyOnRails
[22:07:45] coderMe: has joined #RubyOnRails
[22:08:32] uris: has joined #RubyOnRails
[22:09:29] croberts: has joined #RubyOnRails
[22:09:34] emachnic: has joined #RubyOnRails
[22:10:10] emachnic: has joined #RubyOnRails
[22:12:02] sleungcy_: has joined #RubyOnRails
[22:12:09] legohead: has joined #RubyOnRails
[22:12:17] ravster: has joined #RubyOnRails
[22:12:41] sleungcy_: has joined #RubyOnRails
[22:15:55] rubyonrails522: has joined #RubyOnRails
[22:18:25] yfeldblum: has joined #RubyOnRails
[22:19:41] kirillzh: has joined #RubyOnRails
[22:20:34] pulpfiction: using Rails.cache.fetch, what happens if i return null on the block? will it cache null or will it not cache the key/value at all?
[22:22:42] pawnbox: has joined #RubyOnRails
[22:22:42] HenriettaSalt: has joined #RubyOnRails
[22:24:32] kirillzh: has joined #RubyOnRails
[22:24:43] _Tariq: has joined #RubyOnRails
[22:25:52] Oliphaunte: has joined #RubyOnRails
[22:26:36] k13nox: has joined #RubyOnRails
[22:26:59] djbkd: has joined #RubyOnRails
[22:28:52] Yeomra: has joined #RubyOnRails
[22:29:14] miles: has joined #RubyOnRails
[22:32:19] mephistophocles: has joined #RubyOnRails
[22:32:38] blackmesa: has joined #RubyOnRails
[22:33:40] superlou: has joined #RubyOnRails
[22:36:30] atomical: has joined #RubyOnRails
[22:37:26] flashpoint9: has joined #RubyOnRails
[22:38:17] crdpink: has joined #RubyOnRails
[22:39:58] jgt2: has joined #RubyOnRails
[22:40:38] baweaver: has joined #RubyOnRails
[22:41:22] rgtk: has joined #RubyOnRails
[22:43:28] aaronmoodie: has joined #RubyOnRails
[22:44:29] atomical_: has joined #RubyOnRails
[22:46:46] mary5030: has joined #RubyOnRails
[22:48:04] quazimodo: has joined #RubyOnRails
[22:48:05] quazimod1: has joined #RubyOnRails
[22:48:44] marchelzo: has joined #RubyOnRails
[22:50:06] marchelzo: is rails still cool?
[22:50:42] aaronmoodie: has joined #RubyOnRails
[22:50:47] atomical: has joined #RubyOnRails
[22:52:31] jfelchner: has joined #RubyOnRails
[22:54:01] juddey: marchelzo: its always cool.
[22:54:19] snowy: has joined #RubyOnRails
[22:54:31] rgtk: The real question is: Are Rails developer still cool.
[22:55:02] mustmodify: has joined #RubyOnRails
[22:55:29] marchelzo: it's still worth learning? I don't hear as much about it now as I used to.
[22:55:39] akshat: has joined #RubyOnRails
[22:56:52] rgtk: That's good thing to be honest. You don't hear about it a lot because everything is boring and stable.
[22:57:10] rgtk: It's definitely worth learning.
[22:57:41] baweaver: has joined #RubyOnRails
[22:58:01] marchelzo: what's the best resource to learn it? I want to understand it though, not just have my hend held through running a bunch of magical commands.
[22:58:11] rgtk: Also, when you use Rails, you use Ruby so you can strike out "boring" and replace it with amazing since it's... Ruby!
[22:58:36] rgtk: http://guides.rubyonrails.org/ - that's all you will get from me, good luck!
[22:59:20] one_zero: has joined #RubyOnRails
[23:00:39] quazimodo: has joined #RubyOnRails
[23:00:40] quazimod1: has joined #RubyOnRails
[23:01:18] Rodya_: has joined #RubyOnRails
[23:01:41] meves: has joined #RubyOnRails
[23:02:23] HenriettaSalt: has joined #RubyOnRails
[23:02:25] pawnbox: has joined #RubyOnRails
[23:03:01] theery: has joined #RubyOnRails
[23:03:16] ftj: has joined #RubyOnRails
[23:03:20] Rodya_: has joined #RubyOnRails
[23:03:24] jahbrewski: marchelzo: https://www.railstutorial.org/ is an excellent resource. Used that book to start my own software consultancy.
[23:03:54] nunchuck: has joined #RubyOnRails
[23:04:09] jahbrewski: marchelzo: now I work for myself and life is great :) And I owe a lot to Michael Hartl
[23:04:29] marchelzo: thanks, checking it out
[23:05:39] yoongkang: has joined #RubyOnRails
[23:06:13] Palsson: has joined #RubyOnRails
[23:08:33] jottr_: has joined #RubyOnRails
[23:08:43] mary5030_: has joined #RubyOnRails
[23:09:23] quazimodo: has joined #RubyOnRails
[23:09:57] baweaver: has joined #RubyOnRails
[23:10:30] k13nox: has joined #RubyOnRails
[23:12:17] juddey: marchelzo: also try !r4ia
[23:12:23] HenriettaSalt: has joined #RubyOnRails
[23:12:24] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[23:12:53] legohead: has joined #RubyOnRails
[23:14:04] zyzioziom: has joined #RubyOnRails
[23:14:37] KnownSyntax: has joined #RubyOnRails
[23:14:39] KnownSyntax: has joined #RubyOnRails
[23:17:47] mary5030: has joined #RubyOnRails
[23:17:58] ferr: has joined #RubyOnRails
[23:18:41] mary5030: has joined #RubyOnRails
[23:19:11] wethu: has joined #RubyOnRails
[23:21:44] swillits: has joined #RubyOnRails
[23:23:21] mary5030: has joined #RubyOnRails
[23:23:26] underplank: has joined #RubyOnRails
[23:24:27] underplank: Hi all. Im trying to use active_model_serializers to serialize my json response from a rails-api app. i???ve added the gem, added the serializer and added the incantation to add it to the Application.rb. but Im still not getting the correct serialization back in the rspec tests.
[23:26:15] underplank: any clues where I should start looking?
[23:27:30] baweaver: has joined #RubyOnRails
[23:27:53] rakm: i have the following string in a string column in postgres: "Attach\xE9.zip". actionview is currently throwing an invalid bytesequence error when i try to render it onto a page using erb. i'm not sure where i should be fixing this... is there a charset definition missing somewhere? should i be escaping on db input? should i be enforcing some encoding on render?
[23:28:30] rakm: sorry, i take that back, it's in a string column in sqlite3 right now, not postgres
[23:28:39] rakm: and i'm reading it using the sqlite3 gem
[23:29:00] LambdaSource: has joined #RubyOnRails
[23:31:57] `aspiRe: has joined #RubyOnRails
[23:32:11] Ropeney: has joined #RubyOnRails
[23:32:14] pawnbox: has joined #RubyOnRails
[23:34:26] jacksparrow007: has joined #RubyOnRails
[23:35:01] k13nox: has joined #RubyOnRails
[23:35:02] Uranio: has joined #RubyOnRails
[23:40:06] cajone: has left #RubyOnRails: ()
[23:40:41] chipotle: has joined #RubyOnRails
[23:41:15] smathy: rakm, \xE9 is ?? - I'm thinking maybe you used some gem/lib to upload a file and *it* saved that filename to the DB for you?
[23:41:23] braincrash: has joined #RubyOnRails
[23:41:59] rakm: no idea, i'm working on updating this perl/sqlite3 app to a rails
[23:42:16] rakm: but yeah, i guesed that was the right character, should i fix by updating that in the db manually?
[23:42:30] rakm: or is there a way to convert it (other than gsub) at render time?
[23:44:28] quazimodo: has joined #RubyOnRails
[23:45:55] mikeiniowa: has joined #RubyOnRails
[23:48:34] smathy: rakm, oh right, you have legacy data (a key piece of information :) Better to run a task to update the data in the DB.
[23:48:56] rakm: smathy how did you convert that byte sequence to ?? btw? that one i could guess, but there's other ones too
[23:49:01] cajone: has joined #RubyOnRails
[23:50:09] ElFerna_: has joined #RubyOnRails
[23:51:36] mary5030: has joined #RubyOnRails
[23:54:16] flashpoint9: has joined #RubyOnRails
[23:54:41] jcp: pulpfiction: Caches it for me
[23:55:11] uris: has joined #RubyOnRails
[23:55:25] IrishGringo: has joined #RubyOnRails
[23:55:32] antgel: has joined #RubyOnRails
[23:57:16] smathy: has joined #RubyOnRails
[23:59:25] smathy: rakm, just knew it was a unicode codepoint from experience/memory and googled it up.