« Back to channel list

#RubyOnRails - 04 February 2016

« Back 1 day Forward 1 day »
[00:00:12] Intii: has joined #RubyOnRails
[00:00:28] Pupeno: has joined #RubyOnRails
[00:01:27] KnownSyntax: has joined #RubyOnRails
[00:01:30] KnownSyntax: has joined #RubyOnRails
[00:03:25] jgpawletko: has joined #RubyOnRails
[00:04:32] nullwarp: has joined #RubyOnRails
[00:06:17] holdmypocket: has joined #RubyOnRails
[00:06:23] bronson: matthewd: gotta hand it to you, you were right about actioncable dependencies.
[00:06:35] bronson: I'm amazed at how quickly all that got cleaned up.
[00:06:40] nerium: has joined #RubyOnRails
[00:07:20] bronson: hm, maybe that's a veiled insut. I'm *impressed* at how quickly it was cleaned up.
[00:07:22] Intii: has joined #RubyOnRails
[00:07:29] matthewd: All just a Simple Matter of Programming :)
[00:08:22] pawnbox: has joined #RubyOnRails
[00:08:47] matthewd: I too was surprised, when I had a go, at how achievable it turned out to be
[00:09:05] matthewd: I was expecting EM to put up much more of a fight than it actually did
[00:10:47] SteenJobs: has joined #RubyOnRails
[00:11:03] bronson: me too! that patch had no business being that small.
[00:11:11] bronson: once in a while everything lines up.
[00:11:19] Intii: has joined #RubyOnRails
[00:11:44] bronson: or so I hear...
[00:21:39] sbarg: has joined #RubyOnRails
[00:22:14] DLSteve: has joined #RubyOnRails
[00:23:10] sbarg: has left #RubyOnRails: ()
[00:26:05] epitron: has joined #RubyOnRails
[00:28:21] northfurr: has joined #RubyOnRails
[00:33:31] manfrin: has joined #RubyOnRails
[00:33:58] Devalo: has joined #RubyOnRails
[00:34:40] aloneintheworld: So I have an special role in my app that is ???guest???. There can be only one guest. I have the following route: /dashboard/users/:id(.:format). How do I generate a path like guest_path that points to /dashboard/users/guest ?
[00:35:15] peterevjan: has joined #RubyOnRails
[00:35:19] aloneintheworld: and how do I find that guest in my show action in the user controller based on the route ?
[00:35:20] bronson: aloneintheworld: are you using resourceful routes or just plain get/post/etc?
[00:36:11] bronson: aloneintheworld: gist the relevant entry from your routes file?
[00:36:17] aloneintheworld: bronson: https://gist.github.com/anonymous/5b00aee78ff1e736bc8a
[00:36:40] manfrin: has joined #RubyOnRails
[00:37:16] bronson: right on. did you try this? http://guides.rubyonrails.org/routing.html#nested-resources
[00:37:59] bronson: no idea why you'd need to find a guest when you say there's only one...?
[00:39:06] aloneintheworld: well, I can have /dashboard/users/guest and /dashboard/users/special_guest
[00:39:14] aloneintheworld: both guests are unique
[00:40:26] HalcyonicStorm: has joined #RubyOnRails
[00:40:36] aloneintheworld: I see nested resources are for parent-childre associations, but in this case guest is just an special type of user
[00:40:45] bronson: sounding pretty weird... maybe just use: get 'dashboard/users/special_guest' => 'users#special_guest' and be done with it.
[00:41:17] aloneintheworld: I think I???m making it sound weirder than it really is
[00:41:35] peterevjan: has joined #RubyOnRails
[00:42:14] aloneintheworld: I have tons of regular users, I only have 2 users with uniques roles. I need a route so that I can have a link on my sidebar, that points to those special users
[00:42:21] cschneid: has joined #RubyOnRails
[00:48:16] pawnbox: has joined #RubyOnRails
[00:52:01] alex88: has joined #RubyOnRails
[00:52:34] ElFerna: has joined #RubyOnRails
[00:53:31] lyoshajapan: has joined #RubyOnRails
[00:53:36] jgpawletko: has joined #RubyOnRails
[00:53:47] Doddlin: has joined #RubyOnRails
[00:54:30] Doddlin: Heyy all! Can someone please take a look at this gist and explain to me why my comp 1, 2 and 3 are not taken into consideration by my create-part? https://gist.github.com/anonymous/60d9eb16627edc51da61
[00:55:44] Doddlin: they are in the params but it???s not in the commit :S
[00:56:18] peterevjan: has joined #RubyOnRails
[00:56:26] Ropeney: Doddlin: Why aren't you using select helpers?
[00:56:42] lemur: has joined #RubyOnRails
[00:57:01] Doddlin: Ropeney, I did try that but I couldn???t figure it out??? Got syntax errors all the time, thought this would make it work as well
[00:59:23] sevenseacat: has joined #RubyOnRails
[00:59:46] Doddlin: I mean, they are in the params, shouldn???t that be enough?
[01:00:26] Ropeney: i got no idea the relation a comp to a cargo, sorry i dont know your problem :(
[01:00:28] jottr: has joined #RubyOnRails
[01:01:45] Pazician: has joined #RubyOnRails
[01:01:53] Doddlin: Ropeney, comp 1 to 8 is a column in the cargo which is used to hold a product id
[01:04:24] Ropeney: Doddlin: Cargo.new(cargo_params)
[01:04:59] Doddlin: aaah, ofc! there is a : too much!
[01:05:18] Ropeney: not params[:cargo_params]
[01:05:19] IrishGringo: has joined #RubyOnRails
[01:06:06] northfurr: has joined #RubyOnRails
[01:06:10] Doddlin: Ropeney, thanks a bunch! Did not see that one, works a charm! :D
[01:06:21] Ropeney: Doddlin: I highly suggest rewriting all of that though
[01:06:36] Doddlin: Ropeney, the form or the controller?
[01:06:56] Thib: has joined #RubyOnRails
[01:07:21] Ropeney: Doddlin: and alot of the controller
[01:07:40] Ropeney: you set tanknumber for cargo twice, fair few things you might just want to rethink if u have time :)
[01:08:22] Doddlin: Ropeney, haha yeah, I thought so to, right now I just need it working though, have to present a working prototype asap ^^ But thanks, I will definitely do so when I have the time :)
[01:08:46] uris: has joined #RubyOnRails
[01:09:19] northfurr: anyone familiar with setting up sendgrid to send emails for the clearance gem? :(
[01:10:50] lyoshajapan: has joined #RubyOnRails
[01:11:00] DmitryBochkarev: has joined #RubyOnRails
[01:11:24] dopamean_: has joined #RubyOnRails
[01:11:52] moeabdol1: has joined #RubyOnRails
[01:13:42] moeabdol2: has joined #RubyOnRails
[01:14:03] lyoshajapan: has joined #RubyOnRails
[01:16:14] DmitryBochkarev: has joined #RubyOnRails
[01:16:21] AntiSpamMeta: has joined #RubyOnRails
[01:17:18] crystal77: has joined #RubyOnRails
[01:18:28] kies^: has joined #RubyOnRails
[01:27:04] aaronmoodie: has joined #RubyOnRails
[01:27:37] kings: has joined #RubyOnRails
[01:29:40] peterevjan: has joined #RubyOnRails
[01:31:17] tego101: has joined #RubyOnRails
[01:32:35] mrgreenfur_: has joined #RubyOnRails
[01:34:27] baweaver: has joined #RubyOnRails
[01:34:40] IrishGringo: has joined #RubyOnRails
[01:34:57] jorrin: has joined #RubyOnRails
[01:40:58] Pazician: has joined #RubyOnRails
[01:42:04] baweaver: has joined #RubyOnRails
[01:43:00] ramfjord: has joined #RubyOnRails
[01:43:28] ramfjord: Do any of you guys have apps with multiple database users that have different permissions?
[01:44:02] ramfjord: I'm wondering if there is a best practice for running tests with the database credentials depending on the controller being tested
[01:44:46] ramfjord: I can probably just set it manually and unset it when I need to
[01:44:46] akshat: Why would you want to do that?
[01:46:34] ramfjord: This is app lives on a VPN, and lets people execute arbitrary SQL queries for monitoring. I want to prevent them from accidentally deleting anything. Some of the routes do need write permissions though.
[01:46:45] peterevjan: has joined #RubyOnRails
[01:48:16] akshat: a rails app to let people execute arbitrary sql
[01:49:10] FooMunki: has joined #RubyOnRails
[01:49:27] ja: imagine phpMyAdmin in Rails, with a proper UI?????that???d be pretty cool???
[01:49:27] ramfjord: yup, records the results of those queries periodically in a jsonb column, so you can see how they change over time.
[01:52:36] kies^: has joined #RubyOnRails
[01:53:41] shmilan: has joined #RubyOnRails
[01:54:41] DEA7TH: has joined #RubyOnRails
[02:00:04] Intii: has joined #RubyOnRails
[02:00:48] Pupeno: has joined #RubyOnRails
[02:02:50] techandy1: has joined #RubyOnRails
[02:03:47] techandy1: Good evening everybody
[02:03:54] Thib: has joined #RubyOnRails
[02:04:22] Thib: has joined #RubyOnRails
[02:04:23] GreekFreak: I keep getting "No route matches [GET] "/assets/profile_pic_180x180.png" even when I wrap my call with image_url. What am I missing?
[02:04:57] sevenseacat: your code, for starters
[02:05:02] Ropeney: GreekFreak whats your code and we might see what your missing :)
[02:07:11] techandy1: I am in need of some assists please. I am going through the micheal Hartl ruby on rails tutorial. I am using mysql. I am having a small issue with created_at: <%= 10.minutes.ago %>. When I run the tests it fails. I am using Time.zone.now.to_datetime. How can I use that to get 10 minutes ago and 3 years old and etc....
[02:07:39] sevenseacat: what tests fail?
[02:07:58] GreekFreak: Ropeney, https://gist.github.com/tscholiadis/f7c7209234cd21cd52b1#file-players_list_datatable-rb-L40
[02:08:06] GreekFreak: my issue is on line 40
[02:09:18] techandy1: @sevenseacat, this is my error: ActiveRecord::StatementInvalid: Mysql2::Error: Incorrect datetime value
[02:09:30] Ropeney: GreekFreak: and the image exists in app/assets/images with server restarted?
[02:09:44] sevenseacat: techandy1: ok that doesnt help at all - you need to show us some more information
[02:09:53] sevenseacat: like the full error with the code causing it
[02:10:28] sevenseacat: GreekFreak: remove the "/assets/" from the URL
[02:11:03] tego101: has joined #RubyOnRails
[02:11:20] techandy1: @sevenseacat Error:SessionsControllerTest#test_should_get_new:ActiveRecord::StatementInvalid: Mysql2::Error: Incorrect datetime value: '2016-02-04 01:58:23 UTC' for column 'created_at' at row 1: INSERT INTO `microposts` (`content`, `created_at`, `updated_at`, `id`) VALUES ('I just ate an orange!', '2016-02-04 01:58:23 UTC', '2016-02-04 02:08:24', 499495288)
[02:11:48] sevenseacat: right. that's not a valid database timestamp
[02:11:55] GreekFreak: sevenseacat, Ropeney I had it like that and still the same error. In public assets I have the following 2 files "profile_pic_180x180-063308e342edf28f520bafe075738cb7d8c9850e5e6997ce13df8a4321af2b50.png" and "profile_pic_180x180-9735178386d17165842b9e65d0a2ce55f5a1bf981902b003c41c4603827ef8af.png" - Shouldn't there be only 1?
[02:12:06] uris: has joined #RubyOnRails
[02:12:16] sevenseacat: in public assets in development you shouldnt have anything
[02:12:48] GreekFreak: this is in production. In development it works fine
[02:13:00] sevenseacat: techandy1: so that created_at line you posted is part of a yaml file?
[02:13:17] sevenseacat: GreekFreak: its good to know these things when you ask your question :)
[02:13:25] Ropeney: GreekFreak, seems like your missing alot of context to your question :)
[02:13:39] GreekFreak: sevenseacat, sorry lol Rails 4.2, production server with Apache
[02:15:17] GreekFreak: should the old assets not be deleted after deploy?
[02:15:41] sevenseacat: without knowing your deployment process, we don't know.
[02:16:06] sevenseacat: we also don't know that there are "old assets"
[02:16:24] northfurr: has joined #RubyOnRails
[02:16:54] techandy1: @sevenseacat: here is my yaml file that is creating the issue and the error message. I have put it on pastebin. http://pastebin.com/Pu3LYR9u
[02:17:26] exadeci: has joined #RubyOnRails
[02:17:42] GreekFreak: sevenseacat, here is my deploy.rb https://gist.github.com/tscholiadis/6b8e5d48db50f64b8dd7
[02:18:13] GreekFreak: In capistrano 2.x I had coded in the cleanup, but I read in the "Flow" the the cleanup happens now, but it doesn't seem like it
[02:18:20] sevenseacat: it's far too early in the morning to go fishing for information
[02:18:22] lexiMon: has joined #RubyOnRails
[02:18:26] techandy1: @sevenseacat: I have put my error on pastie.org: http://pastie.org/10707997
[02:18:34] jottr: has joined #RubyOnRails
[02:19:53] GreekFreak: I've even tried manually deleting all the assets in the folder and seeing what happens, and still the same error
[02:20:30] barhum2013: has joined #RubyOnRails
[02:20:34] sevenseacat: GreekFreak: remove the "/assets/" from the URL
[02:20:46] sevenseacat: image_url("asset_profile_whatever.png")
[02:21:22] peterevjan: has joined #RubyOnRails
[02:21:31] GreekFreak: I tried that when you suggested it just now. Still the same error
[02:21:37] sevenseacat: techandy1: you need to format your dates into a format the database expects - eg. 10.minutes.ago.to_formatted_s(:db)
[02:21:47] sevenseacat: GreekFreak: and the generated HTML is?
[02:21:55] sevenseacat: GreekFreak: and the new code is?
[02:22:43] GreekFreak: sevenseacat, generated html is <img class="profile-pic" alt="Profile pic 180x180" src="/images/profile_pic_180x180.png">
[02:22:54] sevenseacat: ok, so the error is different and the file is now missing
[02:23:19] sevenseacat: now precompile your assets because i dont know why you thought deleting them would help
[02:23:39] techandy1: thank you very much your suggestion worked greatly. Thanks @sevenseacat
[02:23:46] GreekFreak: sevenseacat, directly in the server?
[02:23:56] sevenseacat: if thats where you deleted them, then yes.
[02:24:24] GreekFreak: sevenseacat, I thought deleting them would help cause I assumed capistrano or the asset pipeline does the precompile for me
[02:24:44] sevenseacat: capistrano does, but you havent done a deploy have you
[02:26:28] GreekFreak: sevenseacat, I have. This is on my server after I ran cap production deploy
[02:26:47] sevenseacat: its really hard to debug anything with you if you're just doing and doing random things.
[02:26:52] sevenseacat: *just going and doing
[02:27:51] GreekFreak: sevenseacat, no no. Now that I'm asking you I'm following your instructions/advice. I'm telling you what I did before. I had tried deleting them to force cap to recompile them, and now I did a precompile directly on the server
[02:27:53] adavia: has joined #RubyOnRails
[02:27:54] bronson: has joined #RubyOnRails
[02:28:00] GreekFreak: did I understand wrong?
[02:28:11] sevenseacat: deleting them has nothing to do with "forcing cap to recompile them"
[02:28:31] GreekFreak: sevenseacat, yes, I redeployed after the delete
[02:28:31] sevenseacat: do you have precompiled assets on your server?
[02:28:39] Guest56170: has joined #RubyOnRails
[02:29:07] sevenseacat: do you have a public/assets/profile_pic_180x180_<something>.png ?
[02:29:18] GreekFreak: yes. 2 of them actually
[02:29:30] sevenseacat: and what does your code now look like?
[02:29:51] bryanl: has joined #RubyOnRails
[02:30:12] GreekFreak: sevenseacat, https://gist.github.com/tscholiadis/f7c7209234cd21cd52b1#file-players_list_datatable-rb-L40
[02:30:35] sleungcy: has joined #RubyOnRails
[02:31:43] sevenseacat: this might be a silly question, but why are you passing an image_url to image_tag ?
[02:32:04] sevenseacat: and what does image_url return there?
[02:34:03] GreekFreak: sevenseacat, that line returns either the paperclip attachment path or the facebook omniauth user profile. In the event of "no image" it should return the default_url of paperclip, but it kept complaining even in development that the route was missing. When I added the image_url (originally I simply had "/assets/#{player_profile_pic}" ) it worked in dev
[02:34:14] sneakerhax: has joined #RubyOnRails
[02:34:21] sevenseacat: that answers neither of my questions
[02:35:03] GreekFreak: sevenseacat, you asked why I add image_url. It's because without it it didn't work in the image_tag
[02:35:15] sevenseacat: yes, because you prefixed "/assets" again
[02:35:20] sevenseacat: you never do that
[02:35:32] GreekFreak: no no, I prefixed and it worked
[02:36:00] GreekFreak: when I hadn't it complained that no route matched, so I prefixed it
[02:36:18] sevenseacat: remove the image_url, remove the "/assets/", remove all of that junk
[02:36:30] Devalo: has joined #RubyOnRails
[02:36:31] sevenseacat: you've overcomplicating things by far
[02:36:34] GreekFreak: sevenseacat, sorry I'm frustrating you...
[02:36:54] GreekFreak: ok it's gone
[02:37:43] GreekFreak: I deleted that line altogether to display the returned values
[02:37:58] ferr: I have program model and price_lists model, program has many price lists and price_lists belongs to program. How would I make a form to create program with price lists?
[02:38:00] sevenseacat: and whats happening now?
[02:38:34] GreekFreak: so for a user with a missing profile pic it will simply return profile_pic_180x180.png
[02:38:42] GreekFreak: on the dev machine it spits out ActionController::RoutingError (No route matches [GET] "/images/profile_pic_180x180.png")
[02:39:13] sevenseacat: ok, so where is this profile_pic located?
[02:39:14] GreekFreak: the image resides in /app/assets/images/profile_pic_180x180.png
[02:39:43] sevenseacat: so what code do you have now and what html gets generated?
[02:40:23] GreekFreak: Code: https://gist.github.com/tscholiadis/f7c7209234cd21cd52b1#file-players_list_datatable-rb-L40
[02:40:38] ferr: I try something like this: https://gist.github.com/Fercell/7904eb92f7085a902afb
[02:40:43] GreekFreak: html in dev machine: <img class="profile-pic" alt="Profile pic 180x180" src="/images/profile_pic_180x180.png">
[02:41:57] sevenseacat: can you double check the location of that pic in your app?
[02:42:14] sevenseacat: you only get files prefixed with /images if it can't find the image in the asset pipeline
[02:43:20] GreekFreak: sevenseacat, it's in there
[02:43:31] peterevjan: has joined #RubyOnRails
[02:43:37] GreekFreak: in /app/assets/images/profile_pic_180x180.png
[02:44:10] GreekFreak: when I refer to it in an image_tag then it works fine
[02:44:19] ferr: sevenseacat: accepts_nested_attributes_for - that is what I need, right?
[02:44:20] GreekFreak: in a view I mean
[02:44:41] sevenseacat: GreekFreak: uh, isnt that what the problem is? that its not working fine?
[02:45:47] GreekFreak: sevenseacat, that's why I'm confused. In my view it works. In my custom class it doesn't
[02:45:56] lyoshajapan: has joined #RubyOnRails
[02:46:03] sevenseacat: so what exactly is "working fine" ?
[02:46:17] GreekFreak: let me gist you the code that works fine
[02:46:35] Pazician: has joined #RubyOnRails
[02:46:36] siaW: has joined #RubyOnRails
[02:47:51] GreekFreak: sevenseacat, https://gist.github.com/tscholiadis/38af13e56935202c3dac#file-show-html-haml-L4
[02:48:03] peterevjan: has joined #RubyOnRails
[02:48:49] sevenseacat: uh.... how does that relate to "profile_pic_180x180.png"
[02:48:55] GreekFreak: sevenseacat, the generated html is <img class="profile-pic keep-left margins right-20px bottom-20px" alt="Profile pic 180x180 063308e342edf28f520bafe075738cb7d8c9850e5e6997ce13df8a4321af2b50" src="/assets/profile_pic_180x180-063308e342edf28f520bafe075738cb7d8c9850e5e6997ce13df8a4321af2b50.png">
[02:50:03] GreekFreak: and yes, I do see the difference. I just have no idea why it doesn't replicate it on the class it doesn't work in
[02:50:15] sevenseacat: so what happens when you use that same code in your custom class?
[02:51:22] GriffinHeart: has joined #RubyOnRails
[02:51:34] GreekFreak: for some reason the image_tag does not convert it to the one with the long text at the end
[02:52:31] sevenseacat: I'm going back to work now.
[02:53:29] GreekFreak: sevenseacat, thanks for trying
[02:53:50] sevenseacat: yes, you are being very trying
[02:55:09] GreekFreak: I've been at this for about 8 hours now, trying to figure out why it behaves one way in the view and another there...
[02:55:39] GriffinHeart: has joined #RubyOnRails
[02:57:19] sevenseacat: and you waited 45min before telling us of that fact
[02:57:26] baweaver: has joined #RubyOnRails
[02:57:29] uris: has joined #RubyOnRails
[02:58:09] GriffinHeart: has joined #RubyOnRails
[02:58:14] Bloomer: has joined #RubyOnRails
[02:59:23] GreekFreak: sevenseacat, that's because I never realised it was spewing different code until you guided me on where and how to look. I assumed it was doing the same thing, which I now realise was wrong. Dind't intend on waisting your time
[03:04:12] chouhoulis: has joined #RubyOnRails
[03:05:02] Travis-42: has joined #RubyOnRails
[03:05:04] baak: has joined #RubyOnRails
[03:06:49] Travis-42: this may be a bit strange, but I wanted to be able to try to check in precompiled assets and the cache in a way that if assets:precompile was run on a different machine, it wouldn???t recalculate everything and take the full amount of time. But even if I check in public/assets and tmp/cache/assets, assets:precompile still seems to take the full amount of time on a new machine. Is there something else I could do?
[03:13:09] peterevj_: has joined #RubyOnRails
[03:13:38] deweysdecimal: has joined #RubyOnRails
[03:16:42] DLSteve: has joined #RubyOnRails
[03:16:48] lyoshajapan: has joined #RubyOnRails
[03:17:15] lyoshajapan: has joined #RubyOnRails
[03:18:01] ftj: has joined #RubyOnRails
[03:19:21] Pazician: has joined #RubyOnRails
[03:21:05] jonathanwallace1: has joined #RubyOnRails
[03:21:47] shmilan: has joined #RubyOnRails
[03:25:11] sleungcy: has joined #RubyOnRails
[03:30:08] B1n4r10: has joined #RubyOnRails
[03:31:15] uris: has joined #RubyOnRails
[03:32:09] peterevjan: has joined #RubyOnRails
[03:32:40] all4co-op: has joined #RubyOnRails
[03:35:35] justthisguy: has joined #RubyOnRails
[03:37:41] lyoshajapan: has joined #RubyOnRails
[03:41:09] all4co-op: has left #RubyOnRails: ()
[03:42:05] all4co-op: has joined #RubyOnRails
[03:42:42] User458764: has joined #RubyOnRails
[03:46:48] GriffinHeart: has joined #RubyOnRails
[03:47:39] justthisguy: My deployed dbs are on heroku. There is both a staging and a production environment. Somehow I lost the hstores in production but there are still staging. I added a third hstore and put ???enable_extension "hstore"??? in the migration which is the only thing I can think that might have caused this but i ran that migration on staging with no ill effects. Mostly, I need to remedy the situation. I built a migration that will
[03:47:40] justthisguy: restore the columns. My plan is to commit, push to production, run the migration, remove the commit. Does this make sense? Is there a way that is more ???proper????
[03:51:23] jgpawletko: has joined #RubyOnRails
[03:51:47] shmilan: has joined #RubyOnRails
[03:52:05] siaW: has joined #RubyOnRails
[03:52:12] pawnbox: has joined #RubyOnRails
[03:54:24] djbkd: has joined #RubyOnRails
[03:55:54] uris: has joined #RubyOnRails
[03:56:04] NBarnes: has joined #RubyOnRails
[03:57:53] shmilan: has joined #RubyOnRails
[03:58:36] gavinhughes: has joined #RubyOnRails
[03:59:07] dopie: has joined #RubyOnRails
[03:59:59] dcunit3d: has joined #RubyOnRails
[04:00:08] askhat: has joined #RubyOnRails
[04:07:45] shmilan: has joined #RubyOnRails
[04:10:55] user083: has joined #RubyOnRails
[04:11:08] chouhoulis: has joined #RubyOnRails
[04:11:10] arup_r: has joined #RubyOnRails
[04:11:14] jacksparrow007: has joined #RubyOnRails
[04:12:37] Y_Ichiro: has joined #RubyOnRails
[04:12:48] crdpink2: has joined #RubyOnRails
[04:12:56] FooBarWidget: has joined #RubyOnRails
[04:13:25] srinidhi: has joined #RubyOnRails
[04:13:37] Zackio: has joined #RubyOnRails
[04:13:54] FaresKAlaboud: has joined #RubyOnRails
[04:13:56] markelite: has joined #RubyOnRails
[04:14:01] __z0k__: has joined #RubyOnRails
[04:14:02] jxf: has joined #RubyOnRails
[04:14:07] Kilo`byte: has joined #RubyOnRails
[04:14:18] epochwolf: has joined #RubyOnRails
[04:14:25] DefV: has joined #RubyOnRails
[04:14:25] jlyndon: has joined #RubyOnRails
[04:14:29] G: has joined #RubyOnRails
[04:14:41] cschneid: has joined #RubyOnRails
[04:15:03] Eswar: has joined #RubyOnRails
[04:15:19] ancientant: has joined #RubyOnRails
[04:15:19] swgillespie: has joined #RubyOnRails
[04:15:20] Emily: has joined #RubyOnRails
[04:15:34] daxroc: has joined #RubyOnRails
[04:15:37] ebryn: has joined #RubyOnRails
[04:16:19] AntiSpamMeta: has joined #RubyOnRails
[04:16:28] Somnius: has joined #RubyOnRails
[04:17:03] jgpawletko: has joined #RubyOnRails
[04:17:26] LBRapid: has joined #RubyOnRails
[04:17:26] jord: has joined #RubyOnRails
[04:17:56] urkle: has joined #RubyOnRails
[04:18:02] Lloyd: has joined #RubyOnRails
[04:18:05] sdn90: has joined #RubyOnRails
[04:18:06] gmci: has joined #RubyOnRails
[04:18:06] machty: has joined #RubyOnRails
[04:18:20] havenn: has joined #RubyOnRails
[04:18:21] SuppliedRelic: has joined #RubyOnRails
[04:18:23] dragon9783: has joined #RubyOnRails
[04:18:23] jhill_: has joined #RubyOnRails
[04:18:34] adam^: has joined #RubyOnRails
[04:18:35] shmilan: has joined #RubyOnRails
[04:18:46] northfurr_: has joined #RubyOnRails
[04:18:50] tris: has joined #RubyOnRails
[04:19:08] northfurr: has joined #RubyOnRails
[04:19:09] Klumben: has joined #RubyOnRails
[04:19:18] Coldblackice_: has joined #RubyOnRails
[04:19:21] parus: has joined #RubyOnRails
[04:19:24] tpendragon: has joined #RubyOnRails
[04:19:25] Didac: has joined #RubyOnRails
[04:19:27] IceBear: has joined #RubyOnRails
[04:19:30] jottr: has joined #RubyOnRails
[04:19:32] hackeron: has joined #RubyOnRails
[04:19:33] sandroandrade_: has joined #RubyOnRails
[04:19:37] Obi_obi: has joined #RubyOnRails
[04:19:44] Skelz0r: has joined #RubyOnRails
[04:19:49] tw1sted_: has joined #RubyOnRails
[04:19:51] drale2k: has joined #RubyOnRails
[04:19:52] skarn: has joined #RubyOnRails
[04:19:52] shapeshifter: has joined #RubyOnRails
[04:19:58] lorn: has joined #RubyOnRails
[04:20:00] dredozubov: has joined #RubyOnRails
[04:20:12] chridal: has joined #RubyOnRails
[04:20:14] redondos: has joined #RubyOnRails
[04:20:15] aep: has joined #RubyOnRails
[04:20:21] jto: has joined #RubyOnRails
[04:21:08] jalcine: has joined #RubyOnRails
[04:22:07] Meow-J: has joined #RubyOnRails
[04:22:22] ancientant: has joined #RubyOnRails
[04:22:27] braincrash: has joined #RubyOnRails
[04:23:31] GriffinHeart: has joined #RubyOnRails
[04:23:39] AntiSpamMeta: has joined #RubyOnRails
[04:23:46] Bloomer: has joined #RubyOnRails
[04:24:22] andatche: has joined #RubyOnRails
[04:24:52] lyoshajapan: has joined #RubyOnRails
[04:25:33] shmilan: has joined #RubyOnRails
[04:27:04] ruurd: has joined #RubyOnRails
[04:28:18] bronson: has joined #RubyOnRails
[04:28:29] GriffinHeart: has joined #RubyOnRails
[04:28:41] Eswar: has joined #RubyOnRails
[04:29:47] jgt2: has joined #RubyOnRails
[04:32:36] speakingcode: has joined #RubyOnRails
[04:33:18] siaW: has joined #RubyOnRails
[04:33:23] pwnd_nsfw: has joined #RubyOnRails
[04:33:34] yfeldblum: has joined #RubyOnRails
[04:38:04] Devalo: has joined #RubyOnRails
[04:38:25] shmilan: has joined #RubyOnRails
[04:38:33] uris: has joined #RubyOnRails
[04:40:55] pawnbox: has joined #RubyOnRails
[04:45:01] baweaver: has joined #RubyOnRails
[04:45:45] lyoshajapan: has joined #RubyOnRails
[04:46:20] Graphettion: has joined #RubyOnRails
[04:49:00] northfurr: has joined #RubyOnRails
[04:49:00] Sadin: has joined #RubyOnRails
[04:52:28] hive-mind: has joined #RubyOnRails
[04:54:35] PlasmaStar: has joined #RubyOnRails
[04:54:37] rohitverma007: has joined #RubyOnRails
[05:00:04] NBarnes: has joined #RubyOnRails
[05:01:41] ss_much: has joined #RubyOnRails
[05:03:38] moeabdol3: has joined #RubyOnRails
[05:05:16] NBarnes: has joined #RubyOnRails
[05:08:55] krz: has joined #RubyOnRails
[05:09:24] pawnbox: has joined #RubyOnRails
[05:11:12] NBarnes: has joined #RubyOnRails
[05:12:35] peterevjan: has joined #RubyOnRails
[05:13:52] Cervajz: has joined #RubyOnRails
[05:14:34] Cervajz_: has joined #RubyOnRails
[05:15:41] NBarnes: has joined #RubyOnRails
[05:16:33] Cervajz__: has joined #RubyOnRails
[05:17:59] neshmi_: has joined #RubyOnRails
[05:19:23] NBarnes: has joined #RubyOnRails
[05:19:40] Cervajz: has joined #RubyOnRails
[05:20:39] Eswar: has joined #RubyOnRails
[05:23:06] NBarnes: has joined #RubyOnRails
[05:25:00] lyoshajapan: has joined #RubyOnRails
[05:28:34] askhat: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[05:31:38] lyoshajapan: has joined #RubyOnRails
[05:32:03] djbkd: has joined #RubyOnRails
[05:32:05] lyoshajapan: has joined #RubyOnRails
[05:32:56] duncannz: has joined #RubyOnRails
[05:33:20] apotry: has joined #RubyOnRails
[05:34:04] GriffinHeart: has joined #RubyOnRails
[05:36:10] arup_r: has left #RubyOnRails: ()
[05:39:37] GriffinHeart: Hey guys, looking for some advice into metrics and events of a rails app, mainly for detecting soft-problems that are not really exceptions or 5xx errors, what do you guys recommend? or any good articles you know?
[05:40:28] peterevjan: has joined #RubyOnRails
[05:45:08] NBarnes: has joined #RubyOnRails
[05:45:18] arup_r: has joined #RubyOnRails
[05:45:49] jgt2: has joined #RubyOnRails
[06:00:32] shiffles: has joined #RubyOnRails
[06:01:43] maokomioko: has joined #RubyOnRails
[06:08:49] techsethi: has joined #RubyOnRails
[06:08:50] ferr: Any recommendations how I should debug my javascript code if capistrano refuses to deploy it but it works fine in development?
[06:09:13] rhizome: bullet p's me oh sometimes
[06:09:16] chouhoulis: has joined #RubyOnRails
[06:09:30] rhizome: ferr: "refuses?"
[06:09:44] Devalo: has joined #RubyOnRails
[06:09:47] ferr: xecJS::ProgramError: Unexpected token punc ??,??, expected punc ??:?? (line: 29414, col: 17, pos: 839955)
[06:10:11] rhizome: sounds like you have a comma where it wants a colon
[06:10:23] rhizome: s/sound/look/
[06:10:31] ferr: I believe it is line 30
[06:10:34] ferr: https://gist.github.com/Fercell/a4bc74d8c7ee9373104b
[06:10:42] ferr: How would I resolve this if I use variable there
[06:12:05] rhizome: everything else kind of has a name
[06:12:14] rhizome: is it really supposed to just be a bare array?
[06:12:40] ferr: rhizome: no, it gets values fron gon
[06:12:44] QTip: your variable is an array which will be the value of the key, so instead of just putting resources do `resources: resources` on line 30
[06:12:49] QTip: without the ` ofc
[06:12:51] rhizome: is that the next hobbit movie
[06:13:21] QTip: * resources: resources,
[06:13:29] rhizome: yes, what QTip says. are we going to see 'resources: ...' if we go look at the fullcalendar docs?
[06:16:20] ferr: thanks guys
[06:17:19] QTip: also quick github tip, clicking on the line number will generate a link highlight the line number(s), e.g. : https://gist.github.com/Fercell/a4bc74d8c7ee9373104b#file-calendar-js-L30
[06:17:40] chipotle: has joined #RubyOnRails
[06:18:07] triangles: has joined #RubyOnRails
[06:18:21] ja: ???guys???, ???guys???, ???guys??????
[06:21:01] worknick: has joined #RubyOnRails
[06:21:22] GriffinHeart: has joined #RubyOnRails
[06:21:23] worknick: my jq code $('.flwbtn').html("<%= escape_javascript(button_to 'UnFollow',user_pet_follower_path("+$('.userid').text()+","+$('.petid').text()+","+data.id+" ) %>"); dont put the button on page, but this code itself.
[06:21:35] jottr: has joined #RubyOnRails
[06:21:37] dionysus69: has joined #RubyOnRails
[06:23:24] peterevjan: has joined #RubyOnRails
[06:24:00] jahbrewski: has joined #RubyOnRails
[06:24:12] Eswar: has joined #RubyOnRails
[06:24:23] juddey: has joined #RubyOnRails
[06:24:47] pawnbox: has joined #RubyOnRails
[06:26:24] techsethi: has joined #RubyOnRails
[06:27:20] yfeldblum: has joined #RubyOnRails
[06:30:44] sandstrom: has joined #RubyOnRails
[06:31:25] rhizome: what is the file?
[06:32:06] Mia: has joined #RubyOnRails
[06:32:06] Mia: has joined #RubyOnRails
[06:32:22] rhizome: probably #{...} instead of <%= ... %>
[06:32:50] rhizome: maybe. i don't know. i'm having trouble parsing that line
[06:32:56] sevenseacat: i think thats scary code
[06:34:12] worknick: sevenseacat: :-D
[06:34:23] sevenseacat: thats not something to make happy faces about.
[06:34:29] worknick: i just want to printa button to or link_to with the url! what can i do?
[06:34:47] worknick: sevenseacat: ^
[06:35:07] sevenseacat: not much around with javascript?
[06:35:45] worknick: sevenseacat: i have to get the "follower id" dynamically. i cant get the latest value of that if i put this code in rails instead of javascript.
[06:36:06] sevenseacat: why do you need to get the follower id dynamically?
[06:36:11] sevenseacat: that means it can be changed by the user
[06:36:15] rvanlieshout: has joined #RubyOnRails
[06:36:40] sevenseacat: why would it ever be anything other than the current user?
[06:36:44] worknick: sevenseacat: typing just a sec
[06:37:58] shiffles: has joined #RubyOnRails
[06:38:30] worknick: sevenseacat: the unfollow button executes the destroy action of controller. along with user in and pet id it needs the follower id. when user click on follow button i want to replace it with unfollow button. if i just show/ hide those button codes from rails, how can i pass this latest "followed id" to unfollow button?
[06:38:34] worknick: without that id it wont destray.
[06:39:15] sevenseacat: so you need *three IDs* to destroy a single record?
[06:39:36] sevenseacat: personally I would just need the pet ID
[06:39:37] epitron: triple protection
[06:39:48] sevenseacat: and destroy any link between the currently logged in user and that pet
[06:39:58] epitron: that record has 3x more delete abosorbing power than the other leading record
[06:40:03] sevenseacat: *any 'follower' relationship
[06:40:11] shiffles: has joined #RubyOnRails
[06:40:18] worknick: sorry. was using the wrong path.
[06:40:38] epitron: "no matter how far down the wrong path you've gone... turn back." -- dr. jay
[06:41:00] nunchuck: has joined #RubyOnRails
[06:41:02] worknick: and thanks. i cant thik properly these days!
[06:41:12] epitron: not with THAT attitude!
[06:41:23] worknick: I can think properly these days.
[06:42:09] Cervajz: has joined #RubyOnRails
[06:42:39] sevenseacat: if you use any other IDs in the link, it means malicious users could change any of them to follow or unfollow pets as other users
[06:43:11] sevenseacat: I mean sure that's not exactly 'malicious' but it's definitely unwanted behaviour I would think
[06:48:40] Macaveli: has joined #RubyOnRails
[06:52:53] arup_r: has left #RubyOnRails: ()
[06:56:41] dEPy: has joined #RubyOnRails
[06:56:51] lyoshajapan: has left #RubyOnRails: ()
[06:57:03] Puffball: has joined #RubyOnRails
[06:58:32] berserk_ren: has joined #RubyOnRails
[07:00:55] arup_r: has joined #RubyOnRails
[07:01:30] moeabdol4: has joined #RubyOnRails
[07:01:37] GriffinHeart: has joined #RubyOnRails
[07:05:49] solars: has joined #RubyOnRails
[07:06:54] ur5us: has joined #RubyOnRails
[07:08:00] GriffinHeart: has joined #RubyOnRails
[07:08:54] kerunaru: has joined #RubyOnRails
[07:09:49] dEPy_: has joined #RubyOnRails
[07:09:56] alaing: has joined #RubyOnRails
[07:10:54] alaing: has joined #RubyOnRails
[07:11:36] krzkrz: has joined #RubyOnRails
[07:11:56] chouhoulis: has joined #RubyOnRails
[07:11:56] djbkd: has joined #RubyOnRails
[07:13:07] tvw: has joined #RubyOnRails
[07:16:37] Palsson: has joined #RubyOnRails
[07:19:40] mhoungbo: has joined #RubyOnRails
[07:19:51] Cervajz: has joined #RubyOnRails
[07:20:39] ramfjord: has joined #RubyOnRails
[07:23:36] dEPy: has joined #RubyOnRails
[07:24:18] comrad: has joined #RubyOnRails
[07:24:32] nocontrol: has joined #RubyOnRails
[07:25:34] jahbrewski: has joined #RubyOnRails
[07:28:33] scepticulous: has joined #RubyOnRails
[07:30:07] bronson: has joined #RubyOnRails
[07:32:05] User458764: has joined #RubyOnRails
[07:34:33] Fire-Dragon-DoL: 2 weeks ago, internet outage from 1am of friday to 8am monday: 72 hours, ugh. 1 Week ago, one day outage. Now today the ISP modem (not my router) breaks, so now OUTAGE again, and high chance will last 4 days, if not more
[07:34:54] nodejunkie: has joined #RubyOnRails
[07:36:01] Pazician: has joined #RubyOnRails
[07:36:28] darutoko: has joined #RubyOnRails
[07:36:51] dexter_e: has joined #RubyOnRails
[07:37:12] PedramT: has joined #RubyOnRails
[07:37:47] solars: has joined #RubyOnRails
[07:37:50] atmosx: has joined #RubyOnRails
[07:38:15] rhizome: do you live in BFE?
[07:42:53] Guest40619: has left #RubyOnRails: ()
[07:43:27] brendan-: has joined #RubyOnRails
[07:43:32] ruurd: has joined #RubyOnRails
[07:44:47] NBarnes: has joined #RubyOnRails
[07:44:52] Macaveli: has joined #RubyOnRails
[07:45:15] PedramT: has joined #RubyOnRails
[07:46:33] jgt2: has joined #RubyOnRails
[07:47:07] johnflux: has joined #RubyOnRails
[07:47:08] tetraktys: has joined #RubyOnRails
[07:47:24] moeabdol: has joined #RubyOnRails
[07:47:53] arBmind: has joined #RubyOnRails
[07:49:17] NBarnes: has joined #RubyOnRails
[07:49:22] srinidhi: has joined #RubyOnRails
[07:51:46] pawnbox: has joined #RubyOnRails
[07:52:57] NBarnes: has joined #RubyOnRails
[07:56:46] mdw: has joined #RubyOnRails
[07:58:09] Cervajz: has joined #RubyOnRails
[07:58:41] Palsson: has joined #RubyOnRails
[07:58:58] Jasaka: has joined #RubyOnRails
[07:58:58] NBarnes: has joined #RubyOnRails
[08:01:38] sandstrom: has joined #RubyOnRails
[08:02:04] zyzioziom: has joined #RubyOnRails
[08:02:12] junaid: has joined #RubyOnRails
[08:03:06] Guest45453: has left #RubyOnRails: ()
[08:03:22] Radar: has joined #RubyOnRails
[08:03:25] Radar: GOOD MORNING
[08:04:22] rvanlieshout: how was / is rome?
[08:04:55] apeiros: moin Radar
[08:04:59] apeiros: your autojoin is broken ;-p
[08:06:45] NBarnes: has joined #RubyOnRails
[08:07:15] Palsson: has joined #RubyOnRails
[08:07:27] Radar: rvanlieshout: Rome was good, I am in Florence now and headed to Venice this afternooon
[08:08:16] Radar: Just signed in to check my mentions and then I'm going to get ready for today's adventures.
[08:09:06] apeiros: adventure time?
[08:10:37] junzay: has joined #RubyOnRails
[08:11:01] fedexo: has joined #RubyOnRails
[08:11:58] eGGsha: has joined #RubyOnRails
[08:12:31] ur5us: has joined #RubyOnRails
[08:12:50] sandstrom: has joined #RubyOnRails
[08:13:05] chouhoulis: has joined #RubyOnRails
[08:16:04] Fire-Dragon-DoL: Radar: what kind of adventures?
[08:16:23] fedexo_: has joined #RubyOnRails
[08:16:56] Fire-Dragon-DoL: rhizome: no I live in Italy :S but I guess I'm just unlucky, they just activated me the 100mbit and for the LAW OF BANDWIDTH, you can't have good bandwidth if you need it. Hence why the router died
[08:17:03] junzay: I'm new to ruby on rails and want to contribute. How do i get started?
[08:17:09] GriffinHeart: has joined #RubyOnRails
[08:17:13] aganov: has joined #RubyOnRails
[08:17:15] pawnbox: has joined #RubyOnRails
[08:17:21] Fire-Dragon-DoL: junzay: I guess you learn Ruby on Rails as first step?
[08:18:45] junzay: I have learned ruby on rails. The basics. I can build some basic web apps like blog post.
[08:19:05] moeabdol: has joined #RubyOnRails
[08:20:28] neshmi_: has joined #RubyOnRails
[08:21:01] tbuehlmann: junzay, there are some issues waiting for you: https://github.com/rails/rails/issues
[08:21:12] ishahnaz: has joined #RubyOnRails
[08:21:44] tbuehlmann: also, there's a guide you might want to read about contributing: http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html
[08:21:55] jottr: has joined #RubyOnRails
[08:22:17] mdw: has joined #RubyOnRails
[08:23:21] junzay: I checked that out already but there are so many issues. I find it hard to figure out which one i can fix
[08:24:58] ishahnaz: hello there
[08:25:35] Cervajz: has joined #RubyOnRails
[08:25:35] bennytac: has joined #RubyOnRails
[08:25:42] ishahnaz: hello bennytac
[08:27:15] mark3: has joined #RubyOnRails
[08:29:43] treaki: has joined #RubyOnRails
[08:30:36] Palsson: has joined #RubyOnRails
[08:30:53] adac: has joined #RubyOnRails
[08:33:11] benhuda: has joined #RubyOnRails
[08:37:08] Macaveli_: has joined #RubyOnRails
[08:39:43] peterevjan: has joined #RubyOnRails
[08:40:03] siaW: has joined #RubyOnRails
[08:40:53] yfeldblum: has joined #RubyOnRails
[08:40:56] Pupeno: has joined #RubyOnRails
[08:44:10] nettoweb: has joined #RubyOnRails
[08:46:16] dexter_e: has joined #RubyOnRails
[08:46:20] comma8: has joined #RubyOnRails
[08:46:52] PedramT: has joined #RubyOnRails
[08:47:09] jgt2: has joined #RubyOnRails
[08:47:58] AntiSpamMeta: has joined #RubyOnRails
[08:51:45] kp666: has joined #RubyOnRails
[08:52:17] Dreamer3_: has joined #RubyOnRails
[08:53:54] artto: has joined #RubyOnRails
[08:55:53] pwnd_nsfw: has joined #RubyOnRails
[08:57:33] Palsson: has joined #RubyOnRails
[08:58:10] mikecmpbll: has joined #RubyOnRails
[09:00:57] Yeomra: has joined #RubyOnRails
[09:03:38] JohnBat26: has joined #RubyOnRails
[09:04:14] snowy: has joined #RubyOnRails
[09:05:12] Eswar: has joined #RubyOnRails
[09:07:54] jgt2: has joined #RubyOnRails
[09:09:25] rickmasta: has joined #RubyOnRails
[09:09:38] AzaToth: has joined #RubyOnRails
[09:12:27] PedramT: has joined #RubyOnRails
[09:13:21] PedramT: has joined #RubyOnRails
[09:13:28] Doddlin: has joined #RubyOnRails
[09:13:53] chouhoulis: has joined #RubyOnRails
[09:14:37] Karpah: has joined #RubyOnRails
[09:16:35] krzkrz: has joined #RubyOnRails
[09:16:38] Cervajz: has joined #RubyOnRails
[09:18:14] cajone: has joined #RubyOnRails
[09:21:49] rrawlins: has joined #RubyOnRails
[09:22:49] Yeomra: has joined #RubyOnRails
[09:24:29] Cervajz: has joined #RubyOnRails
[09:24:40] PedramT: has joined #RubyOnRails
[09:24:53] defsdoor: has joined #RubyOnRails
[09:25:22] jsrn_: has joined #RubyOnRails
[09:28:06] qejk: has joined #RubyOnRails
[09:28:12] jgt2: has joined #RubyOnRails
[09:30:26] lacrymology: has joined #RubyOnRails
[09:30:31] sandstrom: has joined #RubyOnRails
[09:35:22] sandstrom: has joined #RubyOnRails
[09:37:08] zworks: has joined #RubyOnRails
[09:38:49] Diabolik: sup everyone
[09:39:05] ziyadb: has joined #RubyOnRails
[09:39:09] zworks: Is it possible to create or get ActiveRecord objects by dynamically generated names?
[09:40:01] zworks: I.E. if the name of the table is not know until runtime, can we pass the name and create the activerecord object?
[09:40:39] marr: has joined #RubyOnRails
[09:41:05] errakeshpd: has joined #RubyOnRails
[09:42:08] The_Phoenix: has joined #RubyOnRails
[09:42:08] errakeshpd: how to delete session variables if the user is logged in for 30 minutes (with or without ) activity - Devise
[09:42:41] rvanlieshout: zworks: anything is possible
[09:42:44] rvanlieshout: what's the use case?
[09:43:00] rvanlieshout: errakeshpd: give your session a TTL
[09:43:05] rvanlieshout: and use a store that supports it
[09:43:19] zworks: https://gist.github.com/haswow/7023a346c47e22351db6
[09:43:47] rvanlieshout: zworks: what's the issue with that?
[09:43:58] errakeshpd: rvanlieshout : TTL ?
[09:44:17] zworks: the type 'Cv' will be determined at runtime, from a param
[09:44:31] rvanlieshout: 'Cv'.constantize
[09:44:54] zworks: params[:type].constantize ??
[09:45:37] rvanlieshout: http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-constantize
[09:45:43] rvanlieshout: yep. although you might want to sanitize it first
[09:47:29] rvanlieshout: http://guides.rubyonrails.org/security.html#session-expiry
[09:53:29] Eswar: has joined #RubyOnRails
[09:55:40] lipoqil: has joined #RubyOnRails
[10:03:32] dexter_e: has joined #RubyOnRails
[10:04:10] blackmesa: has joined #RubyOnRails
[10:04:34] GriffinHeart: has joined #RubyOnRails
[10:07:02] Pupeno: has joined #RubyOnRails
[10:10:37] sandstrom: has joined #RubyOnRails
[10:11:15] Cervajz_: has joined #RubyOnRails
[10:13:11] FooMunki: has joined #RubyOnRails
[10:13:51] tetraktys: has joined #RubyOnRails
[10:14:37] chouhoulis: has joined #RubyOnRails
[10:15:35] Doddlin: has joined #RubyOnRails
[10:15:46] sami: has joined #RubyOnRails
[10:21:19] Macaveli: has joined #RubyOnRails
[10:23:18] errakeshpd: <rvanlieshout> Thanks its worked
[10:24:45] atmosx: has joined #RubyOnRails
[10:32:05] bronson: has joined #RubyOnRails
[10:33:53] AimlessRAven: has joined #RubyOnRails
[10:34:39] AimlessRAven: hi all, i have shipment belongs_to order, and order has_many shipments association
[10:35:00] AimlessRAven: i create nested form like simple_fields_for.. my field is apear but when i click submit.. they dont save
[10:35:13] AimlessRAven: i have accepts nested attributes.. in order model
[10:35:24] AimlessRAven: shipment_attributes: [:id, :number, :tracking] in order controller
[10:35:42] rvanlieshout: check your request log
[10:37:51] jgt3: has joined #RubyOnRails
[10:38:40] markelite: has joined #RubyOnRails
[10:38:45] arup_r: has joined #RubyOnRails
[10:38:45] rvanlies1out: has joined #RubyOnRails
[10:39:14] GriffinHeart: has joined #RubyOnRails
[10:39:21] Denarii: has joined #RubyOnRails
[10:39:59] barhum2013_: has joined #RubyOnRails
[10:40:16] gregf_: has joined #RubyOnRails
[10:40:47] johnflux_: has joined #RubyOnRails
[10:41:32] Sirecote: has joined #RubyOnRails
[10:41:44] AimlessRAven: rvanlies1out: my pry doesent stop.. when click submit
[10:41:59] braincrash: has joined #RubyOnRails
[10:42:02] boshhead: has joined #RubyOnRails
[10:42:10] baweaver: has joined #RubyOnRails
[10:42:22] Yeomra: has joined #RubyOnRails
[10:42:52] User458764: has joined #RubyOnRails
[10:44:34] ldnunes: has joined #RubyOnRails
[10:48:11] lubekpl: has joined #RubyOnRails
[10:49:36] srinidhi: has joined #RubyOnRails
[10:50:20] jottr: has joined #RubyOnRails
[10:54:01] srinidhi: has joined #RubyOnRails
[10:55:06] futilegames: has joined #RubyOnRails
[10:55:18] reaVer: has joined #RubyOnRails
[10:58:30] wethu: has joined #RubyOnRails
[10:58:48] Thib_: has joined #RubyOnRails
[10:59:27] c355E3B: has joined #RubyOnRails
[11:00:15] FernandoBasso: has joined #RubyOnRails
[11:00:46] DEA7TH: has joined #RubyOnRails
[11:02:06] Bloomer: has joined #RubyOnRails
[11:03:13] nfk|laptop: has joined #RubyOnRails
[11:04:37] bruce_lee: has joined #RubyOnRails
[11:05:11] blackmesa: has joined #RubyOnRails
[11:06:08] hamed_r: has joined #RubyOnRails
[11:08:05] AlexJakeGreen: has joined #RubyOnRails
[11:09:58] waka: has joined #RubyOnRails
[11:11:12] DoubleMalt: has joined #RubyOnRails
[11:12:13] ferr: has joined #RubyOnRails
[11:13:29] Ropeney: has joined #RubyOnRails
[11:15:19] chouhoulis: has joined #RubyOnRails
[11:15:31] carlosd: has joined #RubyOnRails
[11:17:17] Coldblackice: has joined #RubyOnRails
[11:17:31] GriffinHeart: has joined #RubyOnRails
[11:17:58] DEA7TH_: has joined #RubyOnRails
[11:18:29] aaronmoodie: has joined #RubyOnRails
[11:22:50] Blaze_Boy: has joined #RubyOnRails
[11:23:19] _3by8: has joined #RubyOnRails
[11:24:00] Blaze_Boy: has joined #RubyOnRails
[11:26:15] dionysus69: has joined #RubyOnRails
[11:27:36] _3by8: Does anyone have any recommendations if I want to have a page any user may visit with a proper ID and security token so that the menu which is part of my main application view is hidden? Currently I'm using if current_page? path_here but that's not really working because I can't figure out how to stop Rails from throwing an error when someone isn't pointed at that path.
[11:27:40] artto: has joined #RubyOnRails
[11:27:52] workmad3_: has joined #RubyOnRails
[11:28:19] _3by8: I mean I can think of ways but they'd look really bad.
[11:29:02] oded: has joined #RubyOnRails
[11:29:41] oded: has joined #RubyOnRails
[11:34:35] AimlessRAven: has joined #RubyOnRails
[11:35:02] AimlessRAven: how to check parameters who i pass in model
[11:35:51] ych: has joined #RubyOnRails
[11:40:36] _3by8: What do you mean "check"?
[11:41:05] rvanlieshout: has joined #RubyOnRails
[11:41:22] rvanlieshout: _3by8: could you gist the view and the required condition?
[11:42:30] _3by8: rvanlieshout: too much work, I'll figure it out later... I think Google told me I should look into the layout method.
[11:43:12] FooMunki: has joined #RubyOnRails
[11:46:21] tetraktys: has joined #RubyOnRails
[11:47:21] sandstrom: has joined #RubyOnRails
[11:57:09] Deck`: has joined #RubyOnRails
[11:58:02] ElFerna: has joined #RubyOnRails
[11:59:15] tetraktys: has joined #RubyOnRails
[12:03:32] Deck`: has joined #RubyOnRails
[12:07:17] techsethi: has joined #RubyOnRails
[12:09:16] Otterpocket: has joined #RubyOnRails
[12:09:45] Otterpocket: Anybody here have much experience with refinery CMS ?
[12:10:23] Deck`: has joined #RubyOnRails
[12:12:33] Blaze_Boy: has joined #RubyOnRails
[12:14:09] dosa`: has joined #RubyOnRails
[12:15:10] futilegames: has joined #RubyOnRails
[12:16:07] chouhoulis: has joined #RubyOnRails
[12:16:48] Blaze_Boy: has left #RubyOnRails: ()
[12:16:53] ddv: anyone know how I should use #basic_authorize from Rack::Test::Methods in a rspec-rails integration test?
[12:18:56] Thib: has joined #RubyOnRails
[12:20:10] Thib: has joined #RubyOnRails
[12:20:21] Thib: has joined #RubyOnRails
[12:21:43] mikeiniowa: has joined #RubyOnRails
[12:23:55] waka: has joined #RubyOnRails
[12:25:29] NBarnes: has joined #RubyOnRails
[12:26:35] blackmesa: has joined #RubyOnRails
[12:29:34] arup_r: has left #RubyOnRails: ()
[12:30:19] drale2k: is Sublime dead? Idk when the last update was, can't even remember
[12:30:34] rvanlieshout: do you need an update?
[12:30:42] drale2k: i knew that question would come
[12:30:50] rvanlieshout: i'm using it daily and it works fine
[12:30:57] drale2k: well it works fine most of the time
[12:31:02] drale2k: but i have some issues with themes
[12:31:08] drale2k: i launch it and it forgets about my theme
[12:31:27] drale2k: so is it still maintained and alive or dropped
[12:31:45] matthewd: https://www.sublimetext.com/3dev
[12:32:03] drale2k: it's in beta since 2 years o think
[12:32:33] sergey_makagon: has joined #RubyOnRails
[12:32:40] drale2k: last blog post March 25, 2015
[12:33:00] rvanlieshout: so they don't blog or remove their beta tag
[12:33:07] rvanlieshout: last build is from feb 3
[12:34:41] drale2k: where do you see it's from feb 3 ? The latest build i see is 3083 which is from "26 March 2015"
[12:35:04] rvanlieshout: the dev build
[12:35:37] codedmart: has joined #RubyOnRails
[12:36:38] drale2k: ah i see it, Build 3100
[12:37:11] rvanlieshout: but you might want to contact the author and ask him to release those builds
[12:37:16] rvanlieshout: after you've tried them
[12:37:19] rvanlieshout: or submit a bug report
[12:37:38] drale2k: they are released
[12:37:43] drale2k: "Sublime Text 3 dev builds are currently available to registered users only."
[12:37:54] CornishPasty: Anyone managed to get rails 5b2 to work on heroku?
[12:37:58] rvanlieshout: so i take it you're not a registered user?
[12:38:16] drale2k: why would you take that
[12:38:16] CornishPasty: This is what I get: https://www.irccloud.com/pastebin/83D1FFhy/log.txt
[12:38:47] drale2k: CornishPasty: are you using some addon on heroku ?
[12:38:56] CornishPasty: drale2k: just pg
[12:39:32] drale2k: i was just about to start a new app with b2
[12:39:46] CornishPasty: I'm not sure if the ahoy_matey being there is part of the cause
[12:40:18] rvanlieshout: drale2k: or they don't solve the issue
[12:40:41] drale2k: i don't install dev builds for Sublime
[12:40:46] drale2k: at least i didn't so far
[12:41:18] Pupeno: has joined #RubyOnRails
[12:41:26] sevenseacat: has joined #RubyOnRails
[12:41:59] quazimodo: has joined #RubyOnRails
[12:42:02] quazimod1: has joined #RubyOnRails
[12:42:49] gavinhughes: has joined #RubyOnRails
[12:43:29] rvanlieshout: me neither, but i'm not having issues
[12:44:45] Cervajz: has joined #RubyOnRails
[12:46:42] drale2k: rvanlieshout: at least not with sublime
[12:48:38] drale2k: i really dig the new rails website, like the drawings a lot
[12:51:21] CornishPasty: Hmm, seems my issue is caused by logger.after_initialize not being called...
[12:51:35] kristofferR: has joined #RubyOnRails
[12:51:40] nettoweb: has joined #RubyOnRails
[12:51:47] ravster`: has joined #RubyOnRails
[12:52:23] johnflux: has joined #RubyOnRails
[12:52:50] nocontrol: has joined #RubyOnRails
[12:53:36] Cervajz_: has joined #RubyOnRails
[12:54:18] redondos: has joined #RubyOnRails
[12:54:18] redondos: has joined #RubyOnRails
[12:54:18] blackmesa: has joined #RubyOnRails
[12:54:23] dredozub-: has joined #RubyOnRails
[12:54:31] Yeomra_: has joined #RubyOnRails
[12:55:01] kristofferR: has joined #RubyOnRails
[12:55:15] Sirecote: has joined #RubyOnRails
[12:55:19] aaronmoodie: has joined #RubyOnRails
[12:55:48] JohnBat26: has joined #RubyOnRails
[12:56:18] jhill_: has joined #RubyOnRails
[12:57:09] Macaveli: has joined #RubyOnRails
[12:58:16] Yeomra_: has left #RubyOnRails: ()
[12:59:35] Yeomra: has joined #RubyOnRails
[12:59:50] pawnbox: has joined #RubyOnRails
[13:01:03] worknick: has joined #RubyOnRails
[13:01:31] worknick: i am rendering partial like this <%= render :partial=>"shared/followpets", :locals=>{:pet=> cp.id}%> and then in _followpets.html.erb i have Pet:<%= :pet %> which says undefined variable or method pet
[13:02:14] ddv: worknick: should be just pet
[13:02:28] ddv: <%= pet %>
[13:03:07] worknick: same error.
[13:03:26] rickmasta: has joined #RubyOnRails
[13:03:28] worknick: if i write locals[:pet] it says undefined method local
[13:03:49] ddv: worknick: <%= render "shared/followpets", pet: cp.id %>
[13:05:19] ddv: worknick: :pet is wrong, you should be using pet
[13:06:07] arup_r: has joined #RubyOnRails
[13:06:42] worknick: ActionView::Template::Error (undefined local variable or method `pet' for #<#<Class:0x007fd821739460>:0x007fd821916148>):
[13:06:44] worknick: 1: Pet:<%= pet %>
[13:07:17] arup_r: https://github.com/rails/rails/commit/f2306d05d8b4e77741145be5ce63a1270655fed2 :) OUT!!
[13:07:35] arup_r: worknick: where you have defined it ?
[13:07:36] emilkarl: has joined #RubyOnRails
[13:07:38] CornishPasty: Go turbolinks go
[13:07:51] mdw: has joined #RubyOnRails
[13:08:00] worknick: arup_r: on the page where i am rendering this partial.
[13:08:03] arup_r: Was it bad ? I dunno know. I used it a lot
[13:08:10] arup_r: gist worknick
[13:08:36] CornishPasty: This rails 5b2 error on heroku is driving me nuts :(
[13:08:51] techsethi: has joined #RubyOnRails
[13:09:13] roshanavand: has joined #RubyOnRails
[13:09:45] NBarnes: has joined #RubyOnRails
[13:09:55] roshanavand: has joined #RubyOnRails
[13:10:48] stevednd: has joined #RubyOnRails
[13:11:41] gregf_: has left #RubyOnRails: ()
[13:11:59] worknick: arup_r: https://gist.github.com/wrknck/9e5085c60485d16b104a
[13:12:42] gregf__: has joined #RubyOnRails
[13:12:52] arup_r: you need to assign a value to a local variable before you use it like Pet:<%= pet = 'dog' %>
[13:12:56] User458764: has joined #RubyOnRails
[13:13:11] ddv: <%= render :partial=>"shared/followpets", :object=>{:pet=> cp.id}%> this should be <%= render "shared/followpets", pet: cp.id}%>
[13:13:17] arup_r: wait that is wrong..
[13:13:25] arup_r: I mean my example..
[13:13:30] ddv: worknick: I just told you and you ignored me
[13:13:34] worknick: arup_r: yes. I know!
[13:13:40] arup_r: worknick: follow ddv
[13:13:41] jas02: has joined #RubyOnRails
[13:13:52] worknick: ddv: no. i tried that one. and it still gave same error. I replied you at that time ony.
[13:13:56] arup_r: in your hist, I am not seeing where you have defined the local var
[13:14:02] ddv: worknick: what you have now is totally wrong
[13:14:25] worknick: ddv: but i tried with your code. same error.
[13:14:48] arup_r: worknick: show me how you are rendering ?
[13:14:49] ddv: worknick: where is cp coming from? post ALL the relevant code
[13:14:59] ddv: worknick: also cp is a silly name and non-descriptive
[13:15:31] arup_r: just give the rendering line
[13:16:11] worknick: <%= render "shared/followpets", pet: cp.id%>
[13:16:22] worknick: ddv: cp is current pet.
[13:16:26] worknick: in that loop.
[13:16:42] ddv: worknick: you are posting incomplete code
[13:16:52] chouhoulis: has joined #RubyOnRails
[13:17:09] ddv: worknick: how the hell are we supposed to help when you confuse us with incomplete code?
[13:18:09] worknick: ddv: here is full code https://gist.github.com/wrknck/9e5085c60485d16b104a arup_r
[13:19:07] worknick: ...and it works....
[13:19:48] krzkrz: has joined #RubyOnRails
[13:20:52] worknick: arup_r: how can i capture this "pet" value is controller? params[pet]?
[13:21:34] arup_r: worknick: follow_pet_path(pet_id: pet.id)
[13:22:43] arup_r: can you show what your rake route is telling about follow_pet helper.. I would like to see what is it's corresponding url
[13:23:26] Pazician: has joined #RubyOnRails
[13:24:25] worknick: follow_pet POST /pets/:id/follow(.:format) pets#follow
[13:24:27] worknick: unfollow_pet POST /pets/:id/unfollow(.:format) pets#unfollow
[13:24:51] Macaveli: has joined #RubyOnRails
[13:24:52] arup_r: follow_pet_path(pet) will work then
[13:27:31] nocontrol: has left #RubyOnRails: ()
[13:28:01] tego101: has joined #RubyOnRails
[13:28:51] crystal77: has joined #RubyOnRails
[13:33:43] blackmesa: has joined #RubyOnRails
[13:35:54] lacrymology: has joined #RubyOnRails
[13:36:35] AxonetBE1: has joined #RubyOnRails
[13:37:14] kitsuneyo: has joined #RubyOnRails
[13:37:55] AxonetBE1: if this is my method and I want to call it with only the last param different do I need to repeat all the parameters in front of the last param?
[13:38:00] AxonetBE1: https://gist.github.com/DriesS/d98f8f326cf1c1147a2e
[13:38:57] exadeci: has joined #RubyOnRails
[13:39:05] kitsuneyo: how would i get the number from the end of a string like 'mike-hall-56' with ruby?
[13:39:32] mrgreenfur: has joined #RubyOnRails
[13:39:32] snowy: has joined #RubyOnRails
[13:39:33] rafaelfranca: has joined #RubyOnRails
[13:39:38] kitsuneyo: as in number = 'mike-hall-56'.some_method
[13:40:08] deur-: kitsuneyo: 'mike-hall-56'.split('-').last
[13:40:19] kitsuneyo: thanks deur- that's great
[13:40:33] JohnBat26: has joined #RubyOnRails
[13:43:00] DmitryBochkarev: has joined #RubyOnRails
[13:43:42] baweaver: has joined #RubyOnRails
[13:45:31] symbol: has joined #RubyOnRails
[13:47:31] ql6wlld: has joined #RubyOnRails
[13:47:41] atomical: has joined #RubyOnRails
[13:48:22] mdw: has joined #RubyOnRails
[13:49:17] mary5030: has joined #RubyOnRails
[13:50:13] luizpv: has joined #RubyOnRails
[13:50:32] fwaokda: If I have a model "Game" that has_one "Workout" and the Workout has_many "Measurables". How would I set up my strong parameters for the Game controller so that I can edit the measurables from there? I have "workouts_attributes: [:id, :_destroy, ...]" but do I add an array inside workout attributes for the measurables?
[13:53:44] snowy: has joined #RubyOnRails
[13:54:15] IrishGringo: has joined #RubyOnRails
[13:54:52] triangles: has joined #RubyOnRails
[13:59:29] yardenbar: has joined #RubyOnRails
[14:00:23] AlHafoudh: has joined #RubyOnRails
[14:00:27] Pupeno: has joined #RubyOnRails
[14:00:40] blackmesa: has joined #RubyOnRails
[14:02:05] sandstrom: has joined #RubyOnRails
[14:04:26] paulvt: has left #RubyOnRails: ()
[14:10:06] NBarnes: has joined #RubyOnRails
[14:10:07] kitsuneyo: can you use unless with else?
[14:12:57] snowy: yes kitsuneyo but it's generally considered bad practice as it adds a layer of complexity. generally use unless on it's own, if you need an else use if. but it's up to you.
[14:13:10] kitsuneyo: ok thanks Snowy
[14:17:23] JohnBat26: has joined #RubyOnRails
[14:17:35] chouhoulis: has joined #RubyOnRails
[14:18:22] tbuehlmann: I also avoid `unless` if I have more than one condition
[14:19:49] lessless: has joined #RubyOnRails
[14:20:27] aaronmoodie: has joined #RubyOnRails
[14:21:41] msyvich: has joined #RubyOnRails
[14:21:43] EdwardIII: heh i remember the first time i did unless else in perl, how they laughed at me
[14:22:05] NBarnes: has joined #RubyOnRails
[14:23:07] msyvich: After test cases, Rails is incorrectly forming table names for cleanup. The fixture is at `test/fixtures/files/orders.yml`, it loads correctly, but the test suite attempts to `DELETE FROM files_orders`, causing an error
[14:23:08] msyvich: ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: files_orders: DELETE FROM "files_orders"
[14:23:39] Toledo|gone: has joined #RubyOnRails
[14:23:47] msyvich: Any ideas, why it's loading fixtures into `orders`, but attempting to delete from `files_orders`, seemingly based on the file path?
[14:24:47] sevenseacat: msyvich: why is it in a files folder?
[14:24:53] msyvich: good question
[14:24:55] sevenseacat: it is based on the path, yes
[14:24:58] msyvich: i think i was mistaken to put it there
[14:25:02] sevenseacat: yes, you were
[14:25:26] NBarnes: has joined #RubyOnRails
[14:26:17] bmalum: has joined #RubyOnRails
[14:26:24] aegis3121: has joined #RubyOnRails
[14:26:32] msyvich: thanks sevenseacat :^)
[14:27:19] blackmesa: has joined #RubyOnRails
[14:29:41] Kilo`byte: has joined #RubyOnRails
[14:29:48] drbayer: has joined #RubyOnRails
[14:30:35] crystal77: has joined #RubyOnRails
[14:30:49] Sylario: has joined #RubyOnRails
[14:31:21] Sylario: 12:01 AM, is it 12:01 or 00:01 in 24h ti??e?
[14:31:46] ravster`: has left #RubyOnRails: ()
[14:31:59] ravster`: has joined #RubyOnRails
[14:32:29] matthewd: sylario: 00:01
[14:32:37] NBarnes: has joined #RubyOnRails
[14:33:12] Sylario: I pity the one who wrote the time parser for that
[14:33:50] bronson: has joined #RubyOnRails
[14:33:55] jkamenik: has joined #RubyOnRails
[14:34:49] stannard: has joined #RubyOnRails
[14:36:52] srinidhi: has joined #RubyOnRails
[14:37:05] adavia: has joined #RubyOnRails
[14:38:18] msyvich: has joined #RubyOnRails
[14:41:03] Sadin: has joined #RubyOnRails
[14:43:28] Macaveli: has joined #RubyOnRails
[14:44:14] drale2k: every time i start a new project, i get an error when it tries to install nokogiri. Then i have to install it manually (for the 100th time now) by supplying "--with-xml2-include". It's a path issue and i don't understand why it has to install it again for each project
[14:44:24] sankaber: has joined #RubyOnRails
[14:44:33] drale2k: can't it just use the system gem, the global one ?
[14:45:02] fmcgeough: has joined #RubyOnRails
[14:45:12] dexter_e: has joined #RubyOnRails
[14:45:15] rvanlieshout: drale2k: bundle config build.nokogiri --with-xml-2-include
[14:46:10] drale2k: would that configure bundle so it nows in future about the custom path?
[14:47:07] rvanlieshout: it would tell bundle to supplier that param when building nokogiri
[14:47:20] drale2k: rvanlieshout: awesome thanks
[14:47:40] konsolebox: has joined #RubyOnRails
[14:48:25] northfurr: has joined #RubyOnRails
[14:49:00] jgt3: has joined #RubyOnRails
[14:49:39] Eswar: has joined #RubyOnRails
[14:50:08] sankaber: has joined #RubyOnRails
[14:51:01] shinnya: has joined #RubyOnRails
[14:54:38] kitsuneyo: what option can i use with rake test so capybara tests don't run?
[14:54:50] Rodya_: has joined #RubyOnRails
[14:56:27] HalcyonicStorm: has joined #RubyOnRails
[15:00:34] atomical_: has joined #RubyOnRails
[15:01:13] rashmirathi: has joined #RubyOnRails
[15:01:39] drale2k: oh, default port changed to 3000 ?
[15:01:59] drale2k: i just spent 2 mins trying to figure out why the website won't load :O
[15:02:15] fryguy: drale2k: the default port has always been 3000
[15:02:31] drale2k: .. am i crazy?
[15:02:38] rvanlieshout: is that related to the default port?
[15:02:49] Meow-J: has joined #RubyOnRails
[15:02:57] drale2k: ye i tried :8000 for whatever reason
[15:03:51] B1n4r10: has joined #RubyOnRails
[15:06:56] earfin: has joined #RubyOnRails
[15:10:38] sandstrom: has joined #RubyOnRails
[15:13:31] Frem: has joined #RubyOnRails
[15:13:54] ych: has joined #RubyOnRails
[15:15:01] dopamean_: has joined #RubyOnRails
[15:15:46] nettoweb: has joined #RubyOnRails
[15:17:17] sandstrom: has joined #RubyOnRails
[15:17:37] NBarnes: has joined #RubyOnRails
[15:18:05] aegis3121: has joined #RubyOnRails
[15:18:18] avril14th: has joined #RubyOnRails
[15:19:16] lubekpl: has joined #RubyOnRails
[15:19:36] avril14th: Hello, does anyone know if it's possible to call render without a layout or view but with a file in memory as rendered code? (I'm trying to print a pdf from html/text in a worker)
[15:20:33] rvanlieshout: you have what where?
[15:21:01] avril14th: I receive an email in my rails app
[15:21:07] avril14th: I want to turn the email into a pdf
[15:21:35] rvanlieshout: use content: your_html_string
[15:21:45] avril14th: sounds lovely
[15:23:45] IrishGringo: has joined #RubyOnRails
[15:26:13] NBarnes: has joined #RubyOnRails
[15:26:38] Ropeney: has joined #RubyOnRails
[15:28:33] kies^: has joined #RubyOnRails
[15:29:33] kitsuneyo: has joined #RubyOnRails
[15:30:00] avril14th: rhere is what I tried: ApplicationController.new.render_to_string :content => 'whatever man', :format => :pdf, :template => 'wicked_pdf/template', :layout => 'wicked_pdf'
[15:30:00] avril14th: Sign up for free
[15:30:23] avril14th: that yields an empty string
[15:35:13] holms: has joined #RubyOnRails
[15:35:37] deur-: does anyone here have a better way to provide placeholder content in feature tests than fixtures? or are fixtures pretty much the best solution?
[15:35:56] deur-: s/have/know of/
[15:36:31] kitsuneyo: deur-, factory girl is something i've heard of but never used
[15:36:34] ddv: deur-: factory_girl with faker?
[15:37:47] momomomomo: has joined #RubyOnRails
[15:37:50] holms: Hi :) maybe anyone had problems with bundler in ansible? http://pastebin.com/raw/GSdGf1e4
[15:38:34] VeryBewitching: has joined #RubyOnRails
[15:38:53] VeryBewitching: Good morning folks.
[15:44:31] baweaver: has joined #RubyOnRails
[15:47:13] nettoweb: has joined #RubyOnRails
[15:47:31] smathy: has joined #RubyOnRails
[15:47:33] EdwardIII: faker looks pretty damn good
[15:47:42] jkamenik: has joined #RubyOnRails
[15:49:12] deur-: ddv kitsuneyo EdwardIII: currently using factorygirl, but only to provide model instances in unit tests. Faker might be worth looking into, at first glance. thx!
[15:49:21] NBarnes: has joined #RubyOnRails
[15:49:27] msyvich: has joined #RubyOnRails
[15:49:30] kies^: has joined #RubyOnRails
[15:50:33] sandstrom: has joined #RubyOnRails
[15:51:13] herbst: has joined #RubyOnRails
[15:51:16] solars: does anyone know how to set the ActionMailer log level when using it standalone without rails?
[15:51:56] brycesenz: has joined #RubyOnRails
[15:52:00] mary5030: has joined #RubyOnRails
[15:52:20] herpless: has joined #RubyOnRails
[15:53:02] mary5030: has joined #RubyOnRails
[15:53:40] herbst: when i have a def something(var1: [], var2: []) can i get a list of all arguments to iterate over them?
[15:53:40] Devalo: has joined #RubyOnRails
[15:53:46] rickmasta: has joined #RubyOnRails
[15:54:01] herbst: so {var1: [], var2: []} or something
[15:55:08] earfin: has joined #RubyOnRails
[15:55:26] mag42c: has joined #RubyOnRails
[15:57:38] jkamenik: has joined #RubyOnRails
[15:57:39] jtong: has joined #RubyOnRails
[15:57:54] centrx: has joined #RubyOnRails
[15:59:08] smathy: herbst, best way to do that is to not use keyword args, but rather accept a single hash, ie. `def something(options)`
[15:59:39] tego101: has joined #RubyOnRails
[16:01:24] herbst: i imagined this would be answer, but was still hopping there is some fancyness i dont know about
[16:01:27] herbst: but well, thank you :)
[16:02:03] havenwood: herbst: You *can* get at the keywords like: public_method(:something).parameters.map(&:last) #=> [:var1, :var2]
[16:02:18] havenwood: herbst: The default values are more difficult.
[16:02:33] herbst: i dont need them actually. So. THANK YOU!
[16:02:52] herbst: i did not know i can ask methods for parameters
[16:03:07] havenwood: method(:something).parameters #=> [[:key, :var1], [:key, :var2]]
[16:04:19] reckoner: has joined #RubyOnRails
[16:05:05] reckoner: i heard you guys love monoliths.
[16:05:17] reckoner: ACTION trollface
[16:06:19] nettoweb: has joined #RubyOnRails
[16:07:23] melter: has joined #RubyOnRails
[16:07:47] Demerzel: has joined #RubyOnRails
[16:09:20] mdw: has joined #RubyOnRails
[16:10:35] Demerzel: hello folks
[16:11:03] Demerzel: anyone know if there's a way to serialize ActiveRecord::Relation objects?
[16:12:06] reckoner: why? because, https://github.com/rails/rails/issues/5303
[16:12:22] Demerzel: e.g. I've got an object which takes in an initial record set as an ActiveRecord::Relation and I'm now interested in seeing if I can store this object into the database somewhere and retrieve it at a later date
[16:12:24] astrofog: has joined #RubyOnRails
[16:13:00] Demerzel: didn't even think of trying to_yaml
[16:13:11] Demerzel: checking that
[16:13:38] Demerzel: nvm it just returns empty yaml
[16:14:21] Demerzel: the workaround there probably means it's not talking about what i need anyway
[16:14:32] Demerzel: I'm not interested in storing the list of starting records as an array
[16:14:36] reckoner: json doesn't work for you?
[16:14:47] Demerzel: but i'd like to somehow store the actual query if you would
[16:14:54] Demerzel: so i can use it again
[16:15:01] brendan-_: has joined #RubyOnRails
[16:15:11] Demerzel: .to_sql would work but i wonder if there's an alternative
[16:15:29] reckoner: isn't this what a materialized view does?
[16:15:45] reckoner: or maybe i'm thinking of somethign else.
[16:16:03] chouhoulis: has joined #RubyOnRails
[16:16:09] Demerzel: technically it could be replicated using a materialized view but the to_sql might be an easier solution
[16:16:23] Demerzel: i'd need a new materialized view for each sql
[16:16:37] uris: has joined #RubyOnRails
[16:16:39] reckoner: yeah, mostly just trying to throw out suggestions
[16:16:44] Demerzel: essentially i'm trying to save searches and re-run them in the background to determine if any new matches happen
[16:16:57] reckoner: ohh hrm...,
[16:17:04] bmalum: has joined #RubyOnRails
[16:17:05] reckoner: that sounds like a cool problem.
[16:17:06] Demerzel: my initial approach is to take the input Arel and save that
[16:17:33] Demerzel: even if it's as some abstract structure that I can then re-initialize an ActiveRecord::Relation with
[16:17:49] kitsuneyo: has joined #RubyOnRails
[16:17:54] srinidhi: has joined #RubyOnRails
[16:18:16] Demerzel: something like serialized = search_arel.serialize; original_arel = ActiveRecord::Relation.new(serialized); assert(search_arel.to_sql == original_arel.to_sql)
[16:18:51] Demerzel: i suppose #to_sql might be the best approach at this time
[16:19:13] reckoner: i'm going to look into this too if you circle back around 1p est
[16:19:18] reckoner: i'm curious now
[16:19:24] Demerzel: awesome! :-)
[16:19:34] Demerzel: I'll be back </arnold>
[16:20:31] lessless: has joined #RubyOnRails
[16:20:31] cschneid_: has joined #RubyOnRails
[16:21:10] smathy: Demerzel, I would just save the incoming parameters, rather than the AR object (or even the SQL)
[16:21:12] reckoner: ACTION assumes the answer is caching
[16:21:17] smathy: Oh, gone.
[16:21:21] safetypin: has joined #RubyOnRails
[16:21:33] User458764: has joined #RubyOnRails
[16:21:45] disgrntld: has joined #RubyOnRails
[16:22:11] reckoner: probably wants to cache the query, run it periodically and check the result set for new items
[16:22:19] reckoner: as far as i understood the problem
[16:22:21] sonofdirt: has joined #RubyOnRails
[16:22:22] smathy: The "params -> AR object" part of this is a tiny overhead compared to actually running the query, there's very little to be gained by saving/caching/serializing/whatever anything further down the chain.
[16:22:24] ryanRT: has joined #RubyOnRails
[16:23:16] reckoner: maybe, but i could see why you might want to do it this way.
[16:24:04] arup_r: has left #RubyOnRails: ()
[16:26:12] Demerzel: has joined #RubyOnRails
[16:26:32] Demerzel: it's been a while since i hung out here :-)
[16:26:43] Demerzel: always good to help out when i can
[16:27:15] NBarnes: has joined #RubyOnRails
[16:28:07] pulpfiction: do i need to explicitly specify Rails class when calling Rails methods such as Rails.cache.fetch, Rails.logger.info, etc? or just cache.fetch and logger.info would be sufficient?
[16:28:40] reckoner: depends where you call those methods.
[16:28:44] smathy: reckoner, I can't, why?
[16:28:59] smathy: Demerzel, the "params -> AR object" part of this is a tiny overhead compared to actually running the query, there's very little to be gained by saving/caching/serializing/whatever anything further down the chain.
[16:29:27] chouhoulis: has joined #RubyOnRails
[16:29:29] pulpfiction: reckoner, the controller
[16:29:42] reckoner: smathy i've seen a use case where a startup was crawling websites for new product info
[16:30:01] Demerzel: smathy: true, i guess what I want to capture is the state of the Arel before execution
[16:30:04] reckoner: they've use stored queries like this to diff results and push updates
[16:30:14] Demerzel: with parameters bound and all that
[16:30:17] Demerzel: not to save time
[16:30:22] smathy: pulpfiction, the default is yes, you need to call `Rails.whatever`, in some contexts there are other methods provided that delegate to those Rails methods, eg. in most places you can do just `logger.` but that's because the base class of whatever object it is implements that method for you.
[16:30:22] reckoner: pulpfiction, then no
[16:30:23] Demerzel: but to save the exact query used
[16:31:16] Demerzel: the execution will take time but it'll be executed in the b/g to, as reckoner said, capture diffs between successive executions and use those to drive notifications etc
[16:31:38] smathy: reckoner, well, if they're diffing results then they'd be storing the results I imagine. That's not what this use case is.
[16:32:15] lacrymology: I have a problem with two models that are pretty interdependent. I've got an Event model which has a description, and a Recurrence model which has recurrence data for the event: the limit dates, start day and hour for the event. It's a one-to-one. I check overlaps on the Recurrence object, but that requires the event to be set, because the event is tied to a User and the User knows what's the
[16:32:17] smathy: reckoner, on the re-executing the same query again and again, storing the params is the simplest and will not add any significant overhead vs (trying to) store the AR object or SQL.
[16:32:21] lacrymology: correct time zone to do the math. So at validation time, event.user needs to be set, and recurrence.event needs to be set. To make things even more complex, there's two types of recurrence: weekly and monthly which is implemented with STI, there's a base class Recurrence which so far shouldn't be used directly (but maybe in the near future they'll represent one-off events). So the problem is that
[16:32:27] lacrymology: I can't validate overlaps because recurrence.event doesn't exist before event is saved
[16:32:28] brendan-_: has left #RubyOnRails: ()
[16:32:34] Demerzel: smathy: it works if the diff is happening on e.g. counts and not actual results
[16:32:37] brendan-: has joined #RubyOnRails
[16:32:38] pulpfiction: smathy, reckoner, ok, thanks!
[16:32:45] hobodave: has joined #RubyOnRails
[16:32:52] smathy: Demerzel, well the "params -> AR" object creation would also be done in the background, so same argument applies to both options.
[16:33:34] smathy: Demerzel, see, the other big advantage with storing the params is that you can change your underlying implementation, either changing the DB table, or the models involved, and your query will still work.
[16:33:50] Demerzel: fair enough
[16:34:00] smathy: Demerzel, right, because then it's not storing an AR object, it's storing the results.
[16:34:41] Demerzel: so are you suggesting storing the params and building the ARel using those params?
[16:35:01] Demerzel: thus removing the need to store the ARel altogether?
[16:35:22] Demerzel: and allowing the actual ARel generated to evolve while keeping the params the same
[16:35:26] reckoner: ah, probably right
[16:35:38] smathy: Demerzel, yes, store the input.
[16:35:39] hobodave_: has joined #RubyOnRails
[16:35:46] celly: has joined #RubyOnRails
[16:36:45] polishdub: has joined #RubyOnRails
[16:36:46] smathy: Demerzel, there are basically four stages in an AR query: 1. Building the AR object from the input strings. 2. Creating the SQL from the AR object. 3. Executing the SQL query against the DB. 4. Parsing the result back into AR objects.
[16:37:00] smathy: Demerzel, of those steps 3 takes 100s of times longer than the other three combined.
[16:37:21] smathy: Demerzel, so why bother trying to store the result of (1) or (2) when you can just store the input strings themselves.
[16:37:30] sandstrom: has joined #RubyOnRails
[16:37:33] Demerzel: and store step 0 essentially
[16:37:41] Demerzel: makes sense
[16:38:03] Demerzel: Thank you reckoner and smathy :-)
[16:38:08] smathy: ...which is also the least coupled to your current implementation.
[16:38:08] HalcyonicStorm: has left #RubyOnRails: ()
[16:38:36] Demerzel: I think this makes sense for my case
[16:39:10] Demerzel: time to hold off on the pull request for full #to_yaml support for ActiveRecord::Relation :-P
[16:39:37] celly: has joined #RubyOnRails
[16:44:39] techandy1: has joined #RubyOnRails
[16:45:56] techandy1: Morning everybody. I need some help. I have posted my problem on pastie.org: http://pastie.org/10708874
[16:46:49] reckoner: can't find partial
[16:47:09] fryguy: techandy1: the error message is pretty descriptive, do you have a more specific question
[16:48:33] techandy1: @fryguy, In the tutorial is has nothing about :locale that I am up to yet. And I'm fairly new to Ruby on Rails. How can I solve this issue.
[16:48:48] reckoner: that's okay.
[16:48:54] fryguy: the error has nothing to do with locale, you are missing a file named users/_follow
[16:48:56] reckoner: can you post a bit more code.
[16:49:50] fryguy: also this is irc, not twitter or slack, so the @ isn't needed and actually disables name-highlighting in some/most clients
[16:50:12] vedu: Hello. I am trying to deploy using capistrano but `chruby` cannot be found. Apparently, the correct script is not loading at start. What is the correct way to do it?
[16:50:13] reckoner: yo man, take it easy. he's new.
[16:50:30] fryguy: vedu: use capistrano-chruby
[16:50:59] techandy1: @fryguy, thank you. I miss named the file.
[16:51:19] vedu: fryguy: yes using it. And requiring it in the capfile
[16:52:25] vedu: I tried to use $BASH_ENV, but still no luck
[16:53:27] Cervajz: has joined #RubyOnRails
[16:54:22] fryguy: vedu: is chruby installed?
[16:54:31] chouhoul_: has joined #RubyOnRails
[16:54:36] ziyadb: has joined #RubyOnRails
[16:54:59] vedu: fryguy: yes I installed it using ryan's guide: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
[16:56:21] fryguy: ok, show some error messages
[16:57:28] reckoner: if auto-dated is the only reason for going chruby route, then that's bad advice IMO
[16:57:45] tubbo: ACTION kinda likes the fact that ruby-install doesn't need updating when new versions of ruby come out
[16:57:48] reckoner: if it's outdated and something else, then i'd agree
[16:58:37] arup_r: has joined #RubyOnRails
[16:58:40] reckoner: tubbo are you saying you like your ruby version to automatically update?
[16:58:50] VeryBewitching: I'm using ruby-install and chruby because I found keeping RVM sane was a bit much work.
[16:59:02] fryguy: rbenv is the one you should probably be using
[16:59:03] reckoner: i can see that
[16:59:03] tubbo: reckoner: no, i'm saying i like my ruby installer script to not require updating JUST to install a new version of ruby.
[16:59:16] snowy: has joined #RubyOnRails
[16:59:34] tubbo: i forgot you needed to do that with rbenv/ruby-build until my co-workers had to whine at ops to get a new version of ruby-build on the boxes so we could build 2.3.0 :(
[16:59:59] reckoner: this chruby argument sounds suppect imo. there's ways around an outdated package that doesn't involve installing from source
[17:00:42] msyvich: has joined #RubyOnRails
[17:00:55] Demerzel: vedu: i'd check your .bashrc file on the server where you're deploying it. Some .bashrc files (notably the one for Ubuntu) have a shortcut exit if certain conditions aren't specified. You'll need to ensure any environment variables chruby needs or any .sh files that need to be sourced for it are kept behind that line in your .bashrc
[17:01:06] Demerzel: I had a similar issue working with RVM
[17:01:26] reckoner: then again, mpapis is credited with writing it if you're in the rvm camp
[17:01:36] reckoner: or maintaining
[17:01:52] Demerzel: you might write a capistrano task that prints out your environment variables and other environment information on the remote server
[17:02:00] Demerzel: compare that to what you see when you ssh into the remote server yourself
[17:02:06] reckoner: ACTION reconsiders chruby
[17:02:31] ramfjord: has joined #RubyOnRails
[17:02:53] Demerzel: ACTION reconsiders reconsidering
[17:02:59] vedu: Demerzel: makes sense. will do that.
[17:03:11] jgt3: has joined #RubyOnRails
[17:04:54] hobodave: has joined #RubyOnRails
[17:05:58] Demerzel: vedu: a little reading on the difference between .bash_profile and .bashrc: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
[17:06:38] vedu: Demerzel: I did understand this: http://capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/
[17:06:58] vedu: But now setting $BASH_ENV is not helping
[17:07:25] Bloomer: has joined #RubyOnRails
[17:07:50] IrishGringo: has joined #RubyOnRails
[17:09:17] kolup: has joined #RubyOnRails
[17:09:30] Demerzel: vedu: how're you setting BASH_ENV?
[17:09:43] jkamenik: has joined #RubyOnRails
[17:10:10] vedu: adding the line BASH_ENV="/home/deploy/.non_interactive" in /etc/environment
[17:10:18] vedu: Demerzel: ^
[17:11:03] Demerzel: on the server?
[17:11:15] Demerzel: er.. remote server?
[17:11:19] vedu: Demerzel: yes
[17:11:50] Demerzel: interesting ... i don't think i've ever used BASH_ENV or had anything needed to be setup in /etc/environment
[17:12:11] vedu: Then how did capistrano find chruby?
[17:12:27] Demerzel: what files do you have in /home/deploy's directory? .bashrc and .bash_profile? or equivalent?
[17:12:56] vedu: .bashrc and .profile
[17:13:00] Demerzel: good point :-) i haven't used chruby but I figure it should be similar since you need to setup the environment
[17:13:14] vedu: you use rvm?
[17:13:15] tubbo: you can see just how small it is by doing `which chruby`
[17:13:21] sneakerhax: has joined #RubyOnRails
[17:13:27] tubbo: only 35 loc :)
[17:13:41] Demerzel: vedu: is this an Ubuntu remote server?
[17:13:46] vedu: Demerzel: yes
[17:14:15] Demerzel: open up /home/deploy/.bashrc and you'll probably see a line there near the top that says something like: "# If not running interactively, don't do anything"
[17:14:49] vedu: Demerzel: I placed `source /usr/local/share/chruby/chruby.sh` above it ;-)
[17:15:08] ElFerna: has joined #RubyOnRails
[17:16:15] Demerzel: well ok then :-)
[17:16:22] vedu: Demerzel: I am using pty: true so I should be getting a non-interactive login shell right?
[17:16:39] Demerzel: hang on stand up meeting
[17:17:55] vedu: Demerzel: okay. I need help :(
[17:18:02] djbkd: has joined #RubyOnRails
[17:19:58] [Butch]: has joined #RubyOnRails
[17:22:03] Deck`: has joined #RubyOnRails
[17:23:19] dionysus69: has joined #RubyOnRails
[17:23:54] wldcordeiro: has joined #RubyOnRails
[17:28:00] kristofferR: has joined #RubyOnRails
[17:28:32] ferr: has joined #RubyOnRails
[17:29:15] mdw: has joined #RubyOnRails
[17:32:17] jottr_: has joined #RubyOnRails
[17:35:14] |RicharD|: has joined #RubyOnRails
[17:35:18] sbarg: has joined #RubyOnRails
[17:35:27] sbarg: has left #RubyOnRails: ()
[17:35:39] KensoDev: has joined #RubyOnRails
[17:37:13] msyvich: has joined #RubyOnRails
[17:37:28] jmfurlott: has joined #RubyOnRails
[17:41:35] Demerzel: vedu: just checked my setup and I don't seem to have pty enabled
[17:41:45] Demerzel: how does it look if you set pty: false?
[17:42:25] |RicharD|: guys I've a little problem, doing a simple form with a custom route:
[17:42:26] |RicharD|: https://gist.github.com/inchr/ecf0d13cd447c1598377
[17:42:31] |RicharD|: idea idea where I did wrong ?
[17:42:32] safetypin: has joined #RubyOnRails
[17:42:36] vedu: Demerzel: it looks the same: https://gist.github.com/vedant1811/9ed6cc71c9f9d0cf6fab
[17:42:42] |RicharD|: (I'm sure that is some bullshit that I've done wrong)
[17:43:59] vedu: Demerzel: I am prting .non_interactive that shows the file is being loaded. here's my .non_interactive file: .non_interactive
[17:44:07] vedu: Demerzel: sorry. https://gist.github.com/vedant1811/9ed6cc71c9f9d0cf6fab
[17:44:48] emachnic: has joined #RubyOnRails
[17:45:25] rakm: has joined #RubyOnRails
[17:45:29] baweaver: has joined #RubyOnRails
[17:45:59] Demerzel: can you print out PATH in your .non_interactive file as well? It might be that chruby-exec is assuming chruby is in the path?
[17:47:37] Demerzel: great double-barrelled discussion
[17:47:43] Demerzel: on gist and here
[17:49:27] vedu: Demerzel: okay doing that. Also this command `ssh deploy@xxxx 'echo f'` outputs f. not .non_interactive
[17:49:50] vedu: Demerzel: and PATH is being printed properly
[17:51:40] Felix444: has joined #RubyOnRails
[17:52:45] adre: has joined #RubyOnRails
[17:53:17] Pulp: has joined #RubyOnRails
[17:55:53] sandroandrade_: has left #RubyOnRails: ()
[17:56:04] sandroandrade: has joined #RubyOnRails
[17:56:11] rogue_koder: has joined #RubyOnRails
[17:57:52] ql6wlld: has joined #RubyOnRails
[17:58:47] Demerzel: vedu: is it the same PATH that you see when you login to the server?
[17:58:58] celly: has joined #RubyOnRails
[17:59:23] arup_r: |RicharD|: Your post 'check_in' => 'tasks#check_in' should be a collection route. not a member
[17:59:38] celly: has joined #RubyOnRails
[17:59:55] vedu: Demerzel: actually no. the PATH is longer: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games vs /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
[18:00:03] arup_r: you have member do .. end .. make it collection .. as per the URL you have shown.. if it is a member , then pass the id
[18:00:37] aegis3121: has joined #RubyOnRails
[18:00:45] claytonzaugg: has joined #RubyOnRails
[18:00:46] |RicharD|: arup_r: but I pass the id of the task
[18:00:47] Demerzel: vedu: the one printed via capistrano is longer?
[18:00:54] vedu: Demerzel: yes
[18:01:12] Demerzel: vedu: and is your chruby executable anywhere in that path
[18:01:14] peterevjan: has joined #RubyOnRails
[18:01:15] arup_r: |RicharD|: /api/v1/teams/1/tasks/<id>/add-seo/check_in
[18:01:17] |RicharD|: if I do the collection then the route is: /api/v1/teams/:team_id/tasks/check_in
[18:01:22] arup_r: that id is missing
[18:01:31] chouhoulis: has joined #RubyOnRails
[18:01:32] |RicharD|: the id is address
[18:01:36] |RicharD|: I'm using friendly_id
[18:01:43] dionysus69: has joined #RubyOnRails
[18:01:55] vedu: Demerzel: nope
[18:01:57] manfrin: has joined #RubyOnRails
[18:01:58] Puffball: has joined #RubyOnRails
[18:02:00] arup_r: you passed the id of team, not the task.
[18:02:04] |RicharD|: and in backend I do @team.tasks.friendly.find(params[:id])
[18:02:19] Demerzel: vedu: looks like you might need to modify your .bashrc to adjust the PATH before that line then
[18:02:22] celly_: has joined #RubyOnRails
[18:02:33] Demerzel: add the directory where chruby lives to the PATH i'd imagine
[18:02:37] arup_r: as you have member route , so you also need to pass the task id
[18:02:38] |RicharD|: no aurp_r...also because in console, chrome do this: http://localhost:5000/api/v1/teams/1/tasks/add-seo/check_in
[18:02:51] |RicharD|: that means: http://localhost:5000/api/v1/teams/TEAM_ID/milestones/ID/check_in
[18:03:04] arup_r: |RicharD|: can you do rake routes and show me the specific part please ?
[18:03:28] arup_r: rake routes | grep check_in
[18:03:32] arup_r: |RicharD|: ^^
[18:03:43] |RicharD|: check_in_api_v1_task_milestone POST /api/v1/teams/:team_id/tasks/:id/check_in(.:format) api/v1/tasks#check_in {:format=>"json"}
[18:03:52] arup_r: can you see now ?
[18:04:16] arup_r: "/api/v1/teams/:team_id/tasks/:id/check_in"
[18:04:23] vedu: Demerzel: its a chruby.sh file that needs to be executed. sigh
[18:04:25] arup_r: how many ids the url has ?
[18:04:35] arup_r: and how many you passed?
[18:04:45] flashpoint9: has joined #RubyOnRails
[18:04:58] |RicharD|: http://localhost:5000/api/v1/teams/1/tasks/add-seo/check_in, I've passed 2 ids: 1 - add-seo
[18:05:01] arup_r: you did /api/v1/teams/1/tasks/add-seo/check_in
[18:05:14] |RicharD|: arup_r: address is a ID
[18:05:22] craysiii: has joined #RubyOnRails
[18:05:27] Demerzel: vedu: you should be able to source the chruby.sh file similar to how I'm sourcing the rvm scripts: https://gist.github.com/sjaveed/ae9fc005af2b30f2665d
[18:05:28] |RicharD|: because is done with friendly_id
[18:05:35] arup_r: that I missed ,, sorry
[18:05:43] mikecmpbll: has joined #RubyOnRails
[18:05:53] arup_r: ok now, can you hit the url and pasted the log in the gist .. give the full log
[18:06:55] arup_r: I think format issue, because form_for send `js` as format, and you have JSON .. but not sure
[18:07:01] arup_r: let's see the log
[18:07:56] |RicharD|: ok fixed ;)
[18:08:02] |RicharD|: the logs said this: "PATCH /api/v1/teams/1/milestones/add-seo/check_in HTTP/1.1" 500 - 2.7463
[18:08:13] |RicharD|: but the console of chrome show POST
[18:08:23] |RicharD|: so I've only changed from post to patch in routes.rb
[18:08:35] Puffball: has joined #RubyOnRails
[18:08:45] |RicharD|: and btw is correct, because I'm doing a update
[18:08:51] |RicharD|: of this model
[18:08:56] |RicharD|: not creating a new one
[18:09:01] |RicharD|: that idiot I'm :P
[18:09:04] jmfurlott: has joined #RubyOnRails
[18:09:28] arup_r: i am too .. who completely missed your id..
[18:11:02] yaymukund: has joined #RubyOnRails
[18:11:23] blackmesa: has joined #RubyOnRails
[18:12:04] Haydos: has joined #RubyOnRails
[18:13:25] Demerzel: vedu: any luck?
[18:14:33] jgt3: has joined #RubyOnRails
[18:15:05] sleungcy: has joined #RubyOnRails
[18:16:12] StinkySteve: has joined #RubyOnRails
[18:17:02] uri___: has joined #RubyOnRails
[18:17:23] KensoDev: has joined #RubyOnRails
[18:18:58] Deck`: has joined #RubyOnRails
[18:19:33] KensoDev: has joined #RubyOnRails
[18:20:30] Meow-J: has joined #RubyOnRails
[18:24:05] KensoDev: has joined #RubyOnRails
[18:24:30] Hans267: has joined #RubyOnRails
[18:27:10] ramfjord: has joined #RubyOnRails
[18:28:19] aaronmoodie: has joined #RubyOnRails
[18:28:19] vedu: Demerzel: no :(
[18:29:41] KensoDev_: has joined #RubyOnRails
[18:34:43] zyzioziom: has joined #RubyOnRails
[18:35:32] FLeiXiuS: has joined #RubyOnRails
[18:35:32] FLeiXiuS: has joined #RubyOnRails
[18:36:13] ariedler: has joined #RubyOnRails
[18:38:47] nerium: has joined #RubyOnRails
[18:39:17] drbayer: has joined #RubyOnRails
[18:45:28] User458764: has joined #RubyOnRails
[18:45:41] pilne: has joined #RubyOnRails
[18:46:18] mostlybadfly: has joined #RubyOnRails
[18:47:28] mdw: has joined #RubyOnRails
[18:47:44] baweaver: has joined #RubyOnRails
[18:49:27] arBmind: has joined #RubyOnRails
[18:50:22] treehug88: has joined #RubyOnRails
[18:53:19] djbkd: has joined #RubyOnRails
[18:54:47] atmosx: has joined #RubyOnRails
[18:55:16] Demerzel: vedu: just saw you responded :-) Just a quick check, modifying your .bashrc like so: https://gist.github.com/sjaveed/ae9fc005af2b30f2665d doesn't help?
[18:55:24] sbarg1: has joined #RubyOnRails
[18:55:44] Demerzel: Notice the "source /usr/local/share/chruby/chruby.sh" isn't enclosed in backticks
[18:55:47] visudo: has joined #RubyOnRails
[18:56:32] safetypin: has joined #RubyOnRails
[18:56:32] Demerzel: the backticks fork off a new shell and the source will likely populate that new shell with the new variables it generates or updates. Without the backticks it will update the current shell
[18:56:42] vedu: Demerzel: yes I tried this. in fact I prepended a 'echo 'sourcing chruby in .bashrc'` but that isn't being printed
[18:57:36] Demerzel: is your BASH_ENV still in play?
[18:57:48] vedu: Demerzel: no I removed that
[18:58:10] Demerzel: and pty is false?
[18:58:16] vedu: Demerzel: yes
[18:58:37] Demerzel: hmmm bizarre
[18:58:38] vedu: Demerzel: same result in both pty
[18:58:53] Demerzel: and your shell is bash?
[18:59:04] Demerzel: sanity check
[18:59:25] vedu: Demerzel: how can I find out. Maybe capistrano is using something else
[18:59:59] Demerzel: run capistrano in debugging mode
[19:00:05] Demerzel: i think you can set logging to debug
[19:00:12] Demerzel: and it'll print out all the commands it uses
[19:00:20] sbarg: has joined #RubyOnRails
[19:00:23] drbayer: has joined #RubyOnRails
[19:00:45] aegis3121: has joined #RubyOnRails
[19:00:47] rhizome: what is the problem?
[19:00:48] sbarg: has left #RubyOnRails: ()
[19:00:58] vedu: Demerzel: are you using something like set :default_shell
[19:01:45] vedu: rhizome: I am getting /bin/sh: 1: chruby: not found errors in cap deploy
[19:02:16] jxs_: has joined #RubyOnRails
[19:02:19] Cervajz: has joined #RubyOnRails
[19:02:34] hobodave: has joined #RubyOnRails
[19:02:44] ElFerna: has joined #RubyOnRails
[19:03:45] Demerzel: vedu: your shell is stored in $SHELL
[19:04:28] chouhoul_: has joined #RubyOnRails
[19:04:34] vedu: Demerzel: in ssh it is bash only
[19:04:46] Demerzel: also just for fun
[19:04:57] Demerzel: try changing the "source" to just a period: .
[19:05:22] Demerzel: i believe the functionality is the same but . is more widely used in case there's a difference in the shells you're using
[19:06:20] c0defeed: has joined #RubyOnRails
[19:06:44] mag42c_: has joined #RubyOnRails
[19:07:41] vedu: Demerzel: will do it. thanks for helping me out. Will try to fix it tomorrow
[19:07:46] vedu: Its almost 1am here
[19:08:01] drbayer: has joined #RubyOnRails
[19:08:32] Demerzel: good luck! at this time you've probably made so many changes it's a good idea to systematically evaluate everything in case you missed anything
[19:08:37] Demerzel: change one thing at a time at most
[19:08:40] draig: has joined #RubyOnRails
[19:09:26] vedu: Demerzel: yeah I guess
[19:09:34] c0defeed: Is there some way to tell active admin to *not* attempt to load every association declared in a model
[19:09:51] vedu: Maybe I will start a new server from scratch tomorrow
[19:10:32] podman: has joined #RubyOnRails
[19:11:52] emilkarl: has joined #RubyOnRails
[19:12:44] SteenJobs: has joined #RubyOnRails
[19:15:18] bronson: has joined #RubyOnRails
[19:16:31] Cervajz: has joined #RubyOnRails
[19:18:09] uris: has joined #RubyOnRails
[19:18:40] ElFerna: has joined #RubyOnRails
[19:19:03] Cervajz: has joined #RubyOnRails
[19:19:57] barajasfab: has joined #RubyOnRails
[19:26:09] pwnd_nsfw: has joined #RubyOnRails
[19:28:59] jottr_: has joined #RubyOnRails
[19:29:25] rrawlins: has joined #RubyOnRails
[19:29:42] mr-spoon: has joined #RubyOnRails
[19:31:17] Rodya_: has joined #RubyOnRails
[19:32:08] jkamenik: has joined #RubyOnRails
[19:32:18] avemestr: has joined #RubyOnRails
[19:32:49] HenriettaSalt: has joined #RubyOnRails
[19:33:08] avemestr: has left #RubyOnRails: ()
[19:34:55] kleinerdrache: has joined #RubyOnRails
[19:35:45] kleinerdrache: hi there, any cancancan user who can help me by starting with cancancan. My Question: How can an admin manage all User, where a non admin can manage just himself but cannot destroy himself?
[19:38:38] adac: has joined #RubyOnRails
[19:39:37] srinidhi: has joined #RubyOnRails
[19:40:09] Demerzel: kleinerdrache: something like this might work: https://gist.github.com/sjaveed/a6526a75e08364dbefb2
[19:40:33] YankNYC: has joined #RubyOnRails
[19:40:38] Demerzel: kleinerdrache: you'll have to define the User#admin? method to determine if the user is an admin through whatever means you choose
[19:41:54] PedramT: has joined #RubyOnRails
[19:44:16] arup_r: has joined #RubyOnRails
[19:46:36] ur5us: has joined #RubyOnRails
[19:47:44] lilvim: has joined #RubyOnRails
[19:48:19] askhat: has joined #RubyOnRails
[19:48:58] lilvim: has joined #RubyOnRails
[19:50:54] uris: has joined #RubyOnRails
[19:51:09] askhat: has joined #RubyOnRails
[19:52:54] uris: has joined #RubyOnRails
[19:53:12] Cervajz_: has joined #RubyOnRails
[19:53:47] aarkerio: has joined #RubyOnRails
[19:53:50] rubyonrails819: has joined #RubyOnRails
[19:54:00] kleinerdrache: Demerzel: sounds good, thanks
[19:54:55] mr-spoon: Howdy folks. I'm running RoR 4.2 and am using Sneakers for some background/worker jobs. After an "if model.save" a message is added to the queue....
[19:55:18] mr-spoon: But it seems the record hasn't yet repopulated
[19:55:32] mr-spoon: With an ID or updated_at etc
[19:55:35] jkamenik: has joined #RubyOnRails
[19:55:52] mr-spoon: Any suggestions?
[19:56:08] DoubleMalt: has joined #RubyOnRails
[19:56:24] fryguy: mr-spoon: how are messages added to the queue
[19:56:37] Pazician: has joined #RubyOnRails
[19:57:31] mr-spoon: fryguy I'm using the Bunny gem and model.atteibutes
[19:57:39] mr-spoon: ^attributes
[19:58:13] askhat: has joined #RubyOnRails
[19:58:21] tubbo: mr-spoon: does sneakers come with any kind of visibility into the job queue?
[19:58:31] tubbo: mr-spoon: also, i'm assuming you're running the sneakers worker alongside your rails app
[19:58:42] mdw: has joined #RubyOnRails
[19:59:08] mr-spoon: tubbo correct, and I can view the queue via the RabbitMQ interface
[19:59:25] mr-spoon: I think that save is returning before the transaction has committed
[19:59:25] tubbo: mr-spoon: are the sneakers jobs running?
[19:59:56] mr-spoon: tubbo yeah - this is all happening within the context of a sneakers worker
[20:00:15] aegis3121: has joined #RubyOnRails
[20:00:21] fryguy: mr-spoon: save does return before the transaction is committed
[20:00:28] fryguy: that's why i asked how you are getting messages into the queue
[20:00:33] Demerzel: but at that time you should still have an id
[20:00:34] askhat: has joined #RubyOnRails
[20:00:46] tubbo: you SHOULD
[20:00:50] fryguy: you'd have an id, but the id wouldn't be visible to external processes
[20:00:50] Demerzel: oh interesting
[20:00:53] mr-spoon: fryguy good to know my hunch is correvt
[20:01:09] Demerzel: right right
[20:01:21] tubbo: mr-spoon: how hard would it be to move to activejob with using sneakers as your queue_adapter?
[20:01:27] Demerzel: but the id is still there as in the sequence has already been asked for the next id and it's provided it
[20:01:40] fryguy: mr-spoon: the short answer is you want to use the "after_commit" callback to add things to the queue
[20:01:41] tubbo: Demerzel: yeah but when you do SELECT * FROM table WHERE id = '$id' it won't work
[20:01:50] tubbo: or, more accurately, there's no guarantee it will work
[20:01:52] tubbo: it works *sometimes*
[20:01:55] Demerzel: tubbo: in a different transaction i.e.
[20:02:06] askhat: has joined #RubyOnRails
[20:02:17] mr-spoon: Fryguy / tubbo all of this is happening within a Sneakers worker - it pulls a message out of RabbitMQ, creates a model, saves it, then issues a new message to say that it was created
[20:02:44] Demerzel: because my understanding is (at least with postgres) that the record is immediately accessible within the same transaction before the commit but not in any queries outside of that transaction
[20:03:01] tubbo: mr-spoon: !gist your code
[20:03:01] helpa: mr-spoon: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[20:03:01] fryguy: Demerzel: depends on the transaction isolation level
[20:03:10] tubbo: mr-spoon: should have just asked you for that at the start
[20:03:15] FernandoBasso: has joined #RubyOnRails
[20:03:33] mr-spoon: Tubbo I'll have to do it in a bit, am currently on a train :)
[20:03:40] Demerzel: fryguy: fair enough :-)
[20:04:05] Demerzel: it would've been so much more impressive if you'd said you're on a horse
[20:04:10] Demerzel: but sure, train it is
[20:05:10] Cervajz: has joined #RubyOnRails
[20:05:14] bob14: has joined #RubyOnRails
[20:06:01] futilegames: has joined #RubyOnRails
[20:08:28] benlieb: has joined #RubyOnRails
[20:10:37] msyvich: has joined #RubyOnRails
[20:10:52] doublemalt_: has joined #RubyOnRails
[20:11:04] Macaveli: has joined #RubyOnRails
[20:12:08] benlieb: I'm trying to get a hash of specific attributes that a model has. It feels verbose. Is there a better/native way to do this? attribs = {}; [:name, :email, :message, :message_type].each{|attr| attribs[attr] = s[attr]}
[20:12:38] yfeldblum: has joined #RubyOnRails
[20:13:09] fryguy: benlieb: s.slice(:name, :email, :message, :message_type) does what you want I think
[20:13:11] arup_r: benlieb: Use `only` key
[20:13:42] arup_r: like model.attributes.only(:name, :email, :message, :message_type)
[20:15:06] Cohedrin: has joined #RubyOnRails
[20:15:10] benlieb: fryguy: that's it!
[20:15:37] arup_r: where I saw `only` ? not seeing it in the doc anymore :p
[20:16:22] Cohedrin: has joined #RubyOnRails
[20:16:23] benlieb: arup_r: undefined method `only' for #<Hash:0x007fb6b3754628>
[20:16:43] arup_r: benlieb: yes, I know. I am still searching the doc
[20:16:49] arup_r: I used it, but forgot how
[20:17:02] Demerzel: might be an older api?
[20:17:04] baweaver: has joined #RubyOnRails
[20:17:04] arup_r: benlieb: there are except and only
[20:17:06] rrawlins: has joined #RubyOnRails
[20:17:22] arup_r: except I can see.. but `only` I can't :(
[20:18:46] claytonzaugg: has joined #RubyOnRails
[20:24:01] jtzero: has joined #RubyOnRails
[20:24:52] benlieb: has joined #RubyOnRails
[20:25:03] mhoungbo: has joined #RubyOnRails
[20:26:32] Cervajz: has joined #RubyOnRails
[20:27:11] sandstrom: has joined #RubyOnRails
[20:29:12] pilne: has left #RubyOnRails: ("Leaving!")
[20:29:38] carlosd: has joined #RubyOnRails
[20:29:45] hobodave: has joined #RubyOnRails
[20:31:31] safety_cut: has joined #RubyOnRails
[20:32:34] meoblast001: has joined #RubyOnRails
[20:33:23] safety_cut: has joined #RubyOnRails
[20:33:33] grn: has joined #RubyOnRails
[20:34:10] gr3yR0n1n: has joined #RubyOnRails
[20:34:41] alaing: has joined #RubyOnRails
[20:34:51] alaing: has joined #RubyOnRails
[20:35:10] alaing: hi how do i install a local gem in a gemfile?
[20:35:39] adaedra: in .gem form or from a directory?
[20:35:47] smathy: alaing, :path option?
[20:35:52] alaing: gem 'elements_rails' , :path => "/Users/alaing/Work/elements_rails/pkg"
[20:35:58] Pazician: has joined #RubyOnRails
[20:36:06] alaing: it says it cant find any version of elements_rails
[20:36:26] adaedra: the path should point to the directory holding the .gemspe
[20:36:52] alaing: in that pkg foler there is elements_rails-0.4.0.gem
[20:37:03] alaing: ah the gemspec....
[20:37:06] alaing: let me try that
[20:37:37] tubbo: alaing: yeah it doesn't actually use the .gem package...ruby is an interpreted language and all your gems have exposed source code and being read directly.
[20:38:33] bronson_: has joined #RubyOnRails
[20:38:34] alaing: thats worked.....thank you turbo, smathy, & adaedra
[20:38:46] polishdub_: has joined #RubyOnRails
[20:39:08] smathy: It was all adaedra.
[20:39:47] skyjumpe1: has joined #RubyOnRails
[20:40:30] mary5030_: has joined #RubyOnRails
[20:41:52] grn_: has joined #RubyOnRails
[20:42:33] ndrx42: has joined #RubyOnRails
[20:42:54] abracada-: has joined #RubyOnRails
[20:44:17] Sylario_: has joined #RubyOnRails
[20:44:20] Ankhers_: has joined #RubyOnRails
[20:44:42] raenk_: has joined #RubyOnRails
[20:44:49] [Butch]_: has joined #RubyOnRails
[20:44:55] baweaver: has joined #RubyOnRails
[20:45:01] B1n4r10: has joined #RubyOnRails
[20:45:44] baweaver: has joined #RubyOnRails
[20:45:50] many_: has joined #RubyOnRails
[20:45:52] ltd: has joined #RubyOnRails
[20:46:03] Puffball_: has joined #RubyOnRails
[20:46:09] chouhoulis: has joined #RubyOnRails
[20:46:44] Lloyd__: has joined #RubyOnRails
[20:47:06] urbanmonk: has joined #RubyOnRails
[20:47:27] rrawlins_: has joined #RubyOnRails
[20:48:29] elben: has joined #RubyOnRails
[20:49:01] hobodave: has joined #RubyOnRails
[20:49:05] flashpoint9: has joined #RubyOnRails
[20:49:22] rhizome: resque-history appears dead, or i just don't know how to computer.
[20:49:24] chipotle: has joined #RubyOnRails
[20:49:28] ElFerna: has joined #RubyOnRails
[20:49:30] AntiSpamMeta: has joined #RubyOnRails
[20:49:42] Diabolik: has joined #RubyOnRails
[20:49:42] gr3yR0n1-: has joined #RubyOnRails
[20:49:42] 7F1AA9JOM: has joined #RubyOnRails
[20:49:42] ramfjord: has joined #RubyOnRails
[20:49:42] sleungcy: has joined #RubyOnRails
[20:49:42] Demerzel: has joined #RubyOnRails
[20:49:42] FooMunki: has joined #RubyOnRails
[20:49:42] c355E3B: has joined #RubyOnRails
[20:49:42] 7F1AA9CTD: has joined #RubyOnRails
[20:49:42] tris: has joined #RubyOnRails
[20:49:42] ebryn: has joined #RubyOnRails
[20:49:42] nullwarp: has joined #RubyOnRails
[20:49:42] a1fa: has joined #RubyOnRails
[20:49:42] ddv: has joined #RubyOnRails
[20:49:51] FooMunki_: has joined #RubyOnRails
[20:50:29] c355E3B: has joined #RubyOnRails
[20:50:34] philtr: has joined #RubyOnRails
[20:51:04] Diabolik: has joined #RubyOnRails
[20:51:24] knight_: has joined #RubyOnRails
[20:51:34] Diabolik: has joined #RubyOnRails
[20:51:45] a1fa: has joined #RubyOnRails
[20:51:45] tubbo: rhizome: i'm gonna go with option 2
[20:51:47] ramfjord: has joined #RubyOnRails
[20:52:04] Diabolik: has joined #RubyOnRails
[20:53:32] wethu: has joined #RubyOnRails
[20:54:03] matt_d: has joined #RubyOnRails
[20:55:39] aegis3121: has joined #RubyOnRails
[20:55:49] sleungcy: has joined #RubyOnRails
[20:55:51] nullwarp: has joined #RubyOnRails
[20:56:13] gr3yR0n1n: has joined #RubyOnRails
[20:56:18] tris: has joined #RubyOnRails
[20:57:22] alaing: sorry i've got a really stupid question
[20:57:24] chouhoul_: has joined #RubyOnRails
[20:57:26] alaing: def radio_buttons(method, values, labeler: labeler, **options)
[20:57:36] alaing: is in a form builder
[20:57:41] tubbo: alaing: a stupid question? in #rubyonrails? i won't allow it!
[20:57:52] alaing: how would i call it
[20:58:38] alaing: when i provide 3 arguements it complains that it expects 2 when it received 3
[20:58:38] tubbo: alaing: a FormBuilder is just the object that's passed into the block of `form_for`, so in `form_for @post do |f|`, 'f' is the form builder.
[20:58:50] tubbo: alaing: so calling `f.radio_buttons` will call that method you described.
[20:59:04] tubbo: or at least it should, if builder: YourFormBuilder.new is passed into the form_for haha
[20:59:37] Demerzel: has joined #RubyOnRails
[20:59:55] alaing: ok form_for [:external_users, @claim], builder: ElementsFormBuilder, html: { novalidate: true }, multipart: true, authenticity_token: true do |f|
[21:00:17] Demerzel: oh interesting
[21:00:22] Demerzel: never seen a builder argument to form_for
[21:00:26] Demerzel: what does it do precious?
[21:00:34] Demerzel: what does it do?
[21:01:02] dm_24: has joined #RubyOnRails
[21:01:15] alaing: i figured it would expose those methods to the form_for builder
[21:01:37] mdw: has joined #RubyOnRails
[21:01:57] alaing: i just cant work out what i need to pass in for radio_buttons
[21:01:59] Pazician: has joined #RubyOnRails
[21:02:02] dm_24: anyone got any tips on extending a user's scopes after already being logged in with devise/omniauth? like.. log in with basic google auth, and then later on click a button to get access to drive
[21:02:54] alaing: def radio_buttons(method, values, labeler: labeler, **options)
[21:03:12] alexclink: has left #RubyOnRails: ()
[21:03:29] rhizome: tubbo: have you used it and can tell me it's simply not automatic? :)
[21:03:37] rhizome: "notomatic"
[21:04:01] Pumukel: has joined #RubyOnRails
[21:04:12] djbkd: has joined #RubyOnRails
[21:04:18] Demerzel: dm_24: I've not done that before but I'd imagine it would be a matter of setting up the exact same structure as authentication (i.e. callback controller etc) but in a different namespace (or find a way to do it using params - not sure) but ask for the more elaborate access there. The auth will happen seamlessly since they're auth'ed already and it will then popup for additional permissions
[21:04:28] emachnic_: has joined #RubyOnRails
[21:04:29] alexclink: has joined #RubyOnRails
[21:04:41] Demerzel: dm_24: just a guess
[21:05:22] Demerzel: notomated == manual
[21:10:31] alaing: doesnt like this = f.radio_buttons [:external_users, @claim], DocType.all, :evidence_checklist_ids
[21:11:10] alaing: wrong number of arguments (given 3, expected 2)
[21:11:14] moeabdol: has joined #RubyOnRails
[21:11:37] djbkd: has joined #RubyOnRails
[21:12:42] dm_24_: has joined #RubyOnRails
[21:13:04] dm_24_: thanks Demerzel, i'll see what i can do with the devise docs
[21:13:52] Demerzel: np, good luck
[21:14:13] astrofog: has joined #RubyOnRails
[21:14:15] gr3yR0n1n: has joined #RubyOnRails
[21:14:24] alaing: if this formbuilder was something physical i would throw it out the window
[21:14:31] chouhoulis: has joined #RubyOnRails
[21:15:21] Demerzel: alaing: are you using plain form_for or some other form builder?
[21:15:24] tubbo: alaing: does it work if you just pass 2 args?
[21:15:31] Doddlin: has joined #RubyOnRails
[21:15:55] alaing: if i try this = f.radio_buttons DocType.all, :evidence_checklist_ids
[21:16:20] alaing: undefined method `to_sym' for #<Array:0x007f7f9ced2a38>
[21:16:36] Doddlin: Hi all! I need some assistance with S3-storage and paperclip, tearing my hair over here.. ;(
[21:16:43] tubbo: alaing: so maybe you're not calling the method correctly.
[21:16:50] alaing: Demerzel: a custom formbuilder
[21:16:58] tubbo: alaing: radio_buttons' first argument is called `method`. does `DocType.all` return a method?
[21:16:58] quazimodo: has joined #RubyOnRails
[21:17:01] Demerzel: alaing: oh ok nvm :-)
[21:17:02] tubbo: i'm pretty sure it returns an Array :)
[21:17:04] quazimod1: has joined #RubyOnRails
[21:17:05] aloneintheworld: has joined #RubyOnRails
[21:17:08] Demerzel: Doddlin: what's up? I might be able to help
[21:17:11] Doddlin: I get an error statin that my credentials are not found
[21:17:13] alaing: it does return array ;-)
[21:17:29] Doddlin: Demerzel, I???m following this guide: https://devcenter.heroku.com/articles/paperclip-s3#reference-application
[21:17:53] Demerzel: Doddlin: what version of the aws-sdk gem are you using?
[21:18:10] hahuang65: has joined #RubyOnRails
[21:18:13] alaing: tubbo: if it try = f.radio_buttons :evidence_checklist_ids, DocType.all
[21:18:14] Doddlin: Demerzel, I saw a few errors using latest so I got back to < 2
[21:18:28] Doddlin: so I think 1.66 or something
[21:18:31] alaing: undefined method `call' for nil:NilClass
[21:18:47] Demerzel: < 2 isn't yet supported as far as I remember
[21:18:53] Demerzel: 2 isn't supported
[21:19:02] Doddlin: Demerzel, yeah, found that out as well
[21:19:27] tubbo: alaing: look through the backtrace, open the line of code it's throwing on.
[21:19:42] Doddlin: but however, I have another app configured the exact same way as the one I???m currently working on but it still is not able to connect to the S3 and upload the file
[21:19:56] alaing: tubbo wheres the best place to paste the snipet of code
[21:20:14] Demerzel: how're you setting up the credentials?
[21:20:48] alaing: it takes me to that line calinging the radio_buttons
[21:21:19] Doddlin: Demerzel, in my development.rb
[21:21:31] alaing: it does have somehting Did you mean? caller
[21:21:52] Doddlin: I tried using ENV-variables but I was not able to set them on the server so they are ???hard-coded??? in the dev-file
[21:22:03] Doddlin: just for dev, I will remove them later
[21:22:22] alaing: http://pastebin.com/gh1zX9EZ
[21:22:53] Doddlin: Demerzel, hang on!
[21:22:59] Doddlin: I might have got it now..!
[21:23:22] alaing: http://pastie.org/10709202
[21:23:28] devdazed: has joined #RubyOnRails
[21:23:30] alaing: thats the form builder code
[21:23:36] Doddlin: woo, at least I have a new error! ^^
[21:24:01] arup_r: when trying to update why the error is coming ? https://gist.github.com/aruprakshit/4c6988ce5a0db3084b3f
[21:24:37] devdazed: hi all, got a question on AREL. i am trying to do the equivalent of "(col_a, col_b) IN ..." I have the subquery predicate for the IN clause but not sure how to do the multiple columns as the left side of the infix
[21:27:46] nerium: has joined #RubyOnRails
[21:28:00] Demerzel: Doddlin: that's progress
[21:28:30] Doddlin: Demerzel, haha it is indeed, a new message is one problem solved :P
[21:29:59] Doddlin: YEEEES, there we are! :D
[21:30:34] smathy: devdazed, you can't have multiple columns as the left side of an IN.
[21:30:51] devdazed: in AREL? i though arel supported all valid sql
[21:32:05] aegis3121: has joined #RubyOnRails
[21:32:06] Toledo|gone: has left #RubyOnRails: ()
[21:32:50] devdazed: because it is valid SQL is all SQL92 compliant dbs
[21:33:05] urbanmonk: has joined #RubyOnRails
[21:33:09] devdazed: SQL92 and above
[21:33:46] tetraktys: has joined #RubyOnRails
[21:34:27] FooMunki: has joined #RubyOnRails
[21:36:15] tetraktys: Hey guys, I'm trying to install rspec and guard in a brand new rails 5 beta api and the gemfile dependencies don't match up: https://gist.github.com/joostvanrijn/74993be7648643549a0c has anyone gotten this to install correctly?
[21:37:50] Pazician: has joined #RubyOnRails
[21:38:53] tubbo: alaing: !gist
[21:38:53] helpa: alaing: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:39:22] tubbo: alaing: pssh you should know by now gist is the best!
[21:39:50] claytonzaugg: has joined #RubyOnRails
[21:40:20] hahuang65: has joined #RubyOnRails
[21:40:21] alaing: tubbo, sorry I'll do that now I know other irc tend to have different requirements
[21:41:14] tubbo: alaing: there's another IRC channel for rails?
[21:41:49] alaing: nope but I signed up to various rooms
[21:41:53] alaing: https://gist.github.com/aliuk2012/9d18919e971ffaeaf755
[21:43:16] rhizome: not all channels are as restrictive with codepastes as here
[21:44:41] ql6wlld: has joined #RubyOnRails
[21:45:04] ElFerna: has joined #RubyOnRails
[21:45:09] rhizome: tetraktys: might just be normal beta gem incompatibilities
[21:45:13] devdazed: smathy: well i guess i can just hack it with Arel.sql('(a, b)').in(...)
[21:45:36] tetraktys: rhizome i figured, i'll just fork for the moment :)
[21:45:39] devdazed: just thought Arel would have support for a list of attributes
[21:45:39] rhizome: yikes, what problem is that a good solution?
[21:46:29] aegis3121: has joined #RubyOnRails
[21:46:54] rhizome: oh. devdazed can you get your results with all-raw sql?
[21:47:12] rhizome: through AR i mean
[21:47:20] pyemkey: has joined #RubyOnRails
[21:47:22] devdazed: not using AR
[21:47:29] devdazed: just raw Arel
[21:47:37] Lloyd: has joined #RubyOnRails
[21:47:42] devdazed: the db im using doesnt have an AR adapter for rails 4
[21:47:53] IanMalcolm: has joined #RubyOnRails
[21:47:54] rhizome: which is what
[21:48:07] rhizome: interesting
[21:48:32] rhizome: ah, column
[21:48:44] gavinhughes: has joined #RubyOnRails
[21:48:55] IanMalcolm: has joined #RubyOnRails
[21:48:58] smathy: devdazed, I meant that in SQL itself you can't do that.
[21:49:04] devdazed: sure you can
[21:49:15] rhizome: what about the vertica gem?
[21:49:18] smathy: ...WHERE (a, b) IN ( 1, 2, 3 ) ?
[21:49:28] pyemkey: Hello, I have a problem with compiling assets. I get error "ExecJS::ProgramError: Unexpected token: punc (:)". It's related to files containing angular code. Anyone can help me figure out how can I solve it. I've tried to use as many developers recomment Uglifier.new(mangle: false), but didn't work for me.
[21:49:28] rhizome: seems active
[21:49:29] devdazed: the right side has to be a sub select
[21:49:32] exadeci: has joined #RubyOnRails
[21:49:35] devdazed: select * from users where (first_name, last_name) IN (select 'jon'::text, 'smith'::text);
[21:49:43] smathy: devdazed, oh right, ok.
[21:49:47] devdazed: or even a subselect from another table
[21:49:57] tubbo: devdazed: i wonder if it would work if you did IN ((select 'jon'::text..))
[21:50:06] tubbo: because then you'd be wrapping the query in an exception and THEN wrapping that in an array?
[21:50:12] tubbo: s/query/subquery
[21:50:40] devdazed: tubbo: well the query works, and that is oversimplified, im actually selecting from another table
[21:50:50] devdazed: i just am having trouble translating it to Arel
[21:51:04] tubbo: might be hard to do that in arel without dropping down to sql
[21:51:10] tubbo: i'm not sure how subqueries work with the DSL...
[21:51:35] rhizome: i'm not sure the ARel would be any simpler than SQL
[21:51:46] devdazed: yeah, i a am able to do everything except having two columns on the right side of the IN
[21:52:03] devdazed: rhizome: because it is easier to break it apart into pieces and test it
[21:52:14] devdazed: parts of the query are used for several different queries
[21:52:26] devdazed: and they are all custom
[21:52:46] holms: has left #RubyOnRails: ("WeeChat 1.3")
[21:52:52] rhizome: without arel you're basically writing php
[21:53:12] tubbo: (rolleyes)
[21:53:35] tetraktys: rhizome turns out i just needed to add "rspec" to the array of gems to be loaded from github
[21:54:28] rhizome: tetraktys: that seems like something that might ahve been in an error message?
[21:54:49] tetraktys: I pasted every relevant bit of error message :)
[21:55:53] gambl0re: has joined #RubyOnRails
[21:56:11] tetraktys: it was there, but it was hidden: the rspec gem was resolved to 2.99.0, so i forced it to something else by actually declaring it in the gemfile
[21:56:29] wldcordeiro: has joined #RubyOnRails
[21:56:37] rickmasta: has joined #RubyOnRails
[21:57:12] Demerzel: has joined #RubyOnRails
[21:57:19] celly: has joined #RubyOnRails
[22:01:33] ElFerna: has joined #RubyOnRails
[22:02:54] msyvich: has joined #RubyOnRails
[22:02:55] Felix444: has joined #RubyOnRails
[22:04:41] Rodya_: has joined #RubyOnRails
[22:04:45] neshmi_: has joined #RubyOnRails
[22:06:11] SteenJobs: has joined #RubyOnRails
[22:10:47] dragonkh: has joined #RubyOnRails
[22:11:20] peterevjan: has joined #RubyOnRails
[22:16:28] drbayer: has joined #RubyOnRails
[22:16:59] roshanavand: has joined #RubyOnRails
[22:17:30] pawnbox: has joined #RubyOnRails
[22:18:42] lemur: has joined #RubyOnRails
[22:26:31] kirillzh: has joined #RubyOnRails
[22:30:04] roshanavand: has joined #RubyOnRails
[22:32:31] mices: in acts_as_votable what's the difference between a vote and a like
[22:32:59] mr-spoon: tubbo just to follow up from earlier... this snippet (http://pastebin.com/eLGwTrcP) is running in a Sneakers worker; the message received by RabbitMQ is intermittently missing id / created_at / updated_at presumably due to a race condition with the transaction being committed.
[22:33:54] mr-spoon: or, as pastebin isn't the bin of choice, http://pastie.org/10709273
[22:39:27] sandstrom: has joined #RubyOnRails
[22:40:49] jgt4: has joined #RubyOnRails
[22:41:33] gavinhughes: has joined #RubyOnRails
[22:41:49] nerium: has joined #RubyOnRails
[22:42:00] harly: has joined #RubyOnRails
[22:42:03] quazimodo: has joined #RubyOnRails
[22:42:05] quazimod1: has joined #RubyOnRails
[22:42:26] gavinhughes: has joined #RubyOnRails
[22:43:27] Demerzel: mr-spoon: you might try something like: Rabbit.publish('transaction.created', @transaction.reload.attributes)
[22:43:28] macsteps: has joined #RubyOnRails
[22:43:29] msyvich: has joined #RubyOnRails
[22:43:54] mr-spoon: Demerzel sure - although that will presumably result in an additional database hit?
[22:44:09] mr-spoon: Demerzel I was wondering whether something like until @transaction.persisted? might work
[22:45:06] Demerzel: running that loop without a sleep in there will be problematic and possibly won't resolve the issue at all
[22:45:14] peterevjan: has joined #RubyOnRails
[22:45:18] Demerzel: in that once save is done and it thinks it's saved it well enough to return a status of true
[22:45:21] mr-spoon: Demerzel yeah, and if the save fails might just end up in an infinite loop
[22:45:29] Demerzel: why would it change anything in the persisted attribute?
[22:45:38] Demerzel: the hit might be worth taking
[22:45:41] Demerzel: you can make it conditional
[22:45:58] mr-spoon: Demerzel making it conditional is a great idea
[22:46:04] Demerzel: @transaction.reload unless @transaction.id.present?
[22:46:14] Demerzel: the other possibility is a bit bizarre
[22:46:21] Demerzel: a queue for a queue :-D
[22:46:32] Contigi: has joined #RubyOnRails
[22:46:39] mr-spoon: I like the conditional reload, will give that a shot :)
[22:46:40] tetraktys: has joined #RubyOnRails
[22:46:42] Demerzel: it'll be that loop you want but handled asynchronously
[22:47:02] Demerzel: yeah i'd love to know btw why it fails to set the id
[22:47:08] Demerzel: add some logging to it
[22:47:21] Demerzel: in the conditional
[22:47:24] Demerzel: maybe it'll shed some light
[22:47:29] pawnbox: has joined #RubyOnRails
[22:47:54] Demerzel: see if #persisted? returns true at least
[22:48:06] Demerzel: so you know if it even thinks it saved it
[22:48:26] mr-spoon: Demerzel my theory was that save returns true before the transaction gets committed, which Google / earlier conversations here seem to verify
[22:48:41] Demerzel: so that's the case for sure
[22:48:48] MrPunkin: has joined #RubyOnRails
[22:48:49] Demerzel: there's an after_save callback and an after_commit callback
[22:49:14] Demerzel: one possibility is to put the Rabbit.publish call in an after_commit callback
[22:49:29] Demerzel: but i'm not sure if you do nested transactions and the like
[22:49:36] Demerzel: and how that'll impact the callback
[22:50:04] mr-spoon: Demerzel yeah, I'd thought about that using after_commit but I don't like the idea of bloating the model with the concern
[22:50:09] MrPunkin: has left #RubyOnRails: ()
[22:50:15] mr-spoon: I don't want it to fire every time a model is saved, only in this circumstance etc.
[22:51:33] mr-spoon: Demerzel interestingly, @transaction.persisted? does return false
[22:51:57] Demerzel: do you have any other callbacks in the model that could prevent saving?
[22:52:23] mr-spoon: it does save, I can see it in the DB
[22:52:33] yfeldblum: has joined #RubyOnRails
[22:52:33] mr-spoon: its just the race condition
[22:52:50] mices: what's the difference between a vote and a like
[22:52:51] TravisTheNavi: has joined #RubyOnRails
[22:54:09] mr-spoon: Demerzel unfortunately, reload doesn't work either until the ID is set on the model
[22:55:39] Demerzel: and save returns true?
[22:55:59] TravisTheNavi: has joined #RubyOnRails
[22:56:08] mr-spoon: Demerzel yup
[22:57:31] ramfjord: has joined #RubyOnRails
[22:58:07] TravisTheNavi: has joined #RubyOnRails
[22:58:08] one_zero: has joined #RubyOnRails
[22:58:16] Demerzel: just for kicks
[22:58:42] TravisTheNavi: has joined #RubyOnRails
[22:58:46] Demerzel: what happens if you keep the conditional in place and just log the save and persisted status but do the actual rabbit work in an after_commit hook
[22:58:55] Demerzel: just to see if that's even viable
[22:59:07] TravisTheNavi: has joined #RubyOnRails
[22:59:15] Demerzel: after_commit :publish, on: :create
[22:59:26] Demerzel: might help make this less costly
[22:59:39] roshanavand: has joined #RubyOnRails
[22:59:41] TravisTheNavi: has joined #RubyOnRails
[23:00:17] eo: has joined #RubyOnRails
[23:00:44] TravisTheNavi: has joined #RubyOnRails
[23:01:07] TravisTheNavi: has joined #RubyOnRails
[23:01:28] mr-spoon: Demerzel the after_commit hook works without issue
[23:01:34] Demerzel: mr-spoon: and, to complete the thought, define the :publish method on the model with this functionality
[23:01:41] mwlang: has joined #RubyOnRails
[23:02:10] TravisTheNavi: has joined #RubyOnRails
[23:02:12] juddey: has joined #RubyOnRails
[23:02:19] djbkd: has joined #RubyOnRails
[23:02:23] Demerzel: so at least there's a workaround if not an ideal solution
[23:02:31] mr-spoon: is there any way to configure an after_commit hook from outside of the model? a pub/sub or observer pattern on a model instance?
[23:02:52] Demerzel: there's the rails-observers gem that has that functionality
[23:03:02] safety_cut: has joined #RubyOnRails
[23:03:08] TravisTheNavi: has joined #RubyOnRails
[23:03:09] Demerzel: but essentially it relies on the same functionality
[23:03:48] mr-spoon: Demerzel indeed, I think I used that on a previous project when it was Notifications in core (Rails 3?)
[23:04:07] safety_cut: has joined #RubyOnRails
[23:04:22] rodfersou: has joined #RubyOnRails
[23:07:24] mr-spoon: Demerzel thanks for your help, its frustrating that there isn't a more elegant solution but like you said, at least the lifecycle hooks work
[23:10:09] Demerzel: mr-spoon: how's often does that get called?
[23:11:24] mr-spoon: reasonably frequently... the Sneakers worker subscribes to RabbitMQ watching for transaction.new messages, which trigger the create operations
[23:11:31] Demerzel: depending on how likely it is that multiple Transactions are created very close to each other, essentially both records get saved but the race condition just changes the id of the next one to a different id
[23:11:38] Demerzel: if the ids were guaranteed to be non-conflicting
[23:11:44] Demerzel: (think uuids or some such)
[23:11:51] Demerzel: perhaps the race condition won't even come into play
[23:12:08] mr-spoon: Demerzel ahh, so threads are likely to be the reason for the issue?
[23:12:13] Demerzel: pg at least supports uuids natively
[23:12:18] rrawlins: has joined #RubyOnRails
[23:12:31] Demerzel: yeah that's my thought
[23:12:34] rafaelfranca: has joined #RubyOnRails
[23:12:55] Demerzel: depending on how the code is running of course
[23:13:00] mr-spoon: Demerzel yeah, that would make sense. The worker is prefetching 10 messages at a time from the MQ, using threads
[23:13:17] mr-spoon: so the database takes a pummeling
[23:15:45] Demerzel: mr-spoon: what database are you using?
[23:16:24] lacrymology: has joined #RubyOnRails
[23:16:42] crystal77: has joined #RubyOnRails
[23:16:50] mr-spoon: currently MySQL, but I'm not opposed to switching to Postgres
[23:18:16] Demerzel: so i think this might go away with postgres
[23:18:35] Demerzel: just read up on the sequences in postgres and they look like they should prevent this
[23:18:44] Demerzel: at the very least the ids won't change from under you
[23:19:03] mr-spoon: Demerzel that sounds good -- so basically you've got two transactions assigning the same autoincrement ID from MySQL
[23:19:10] Demerzel: i'd read up on mysql sequences/autoincrement to see if it's meant to be threadsafe and how it handles multiple transactions
[23:19:12] mr-spoon: one writes, the other can't so has to reassign the id causing a delay
[23:19:16] Demerzel: mr-spoon: right
[23:19:20] sasasekaric: has joined #RubyOnRails
[23:19:35] Demerzel: with postgres, the sequence's nextval call is atomic and will always give a continuously increasing number
[23:19:49] mr-spoon: Demerzel I really appreciate your insight on this, it had me tearing my hair out this afternoon :)
[23:19:51] Demerzel: if two threads hit the server from different connections simultaneously
[23:20:04] Demerzel: nextval will atomically give an id to one and then to the other
[23:20:07] mhoungbo: has joined #RubyOnRails
[23:20:09] Demerzel: those ids won't change going forward
[23:20:26] Demerzel: mr-spoon: no worries - it's an interesting thing to think about :-)
[23:20:49] peterevjan: has joined #RubyOnRails
[23:21:37] treaki: has joined #RubyOnRails
[23:22:08] quazimodo: has joined #RubyOnRails
[23:24:48] yfeldblum: has joined #RubyOnRails
[23:27:03] quazimod1: has joined #RubyOnRails
[23:27:58] baweaver: has joined #RubyOnRails
[23:29:11] funnel: has joined #RubyOnRails
[23:30:05] Prasun: has joined #RubyOnRails
[23:32:22] Kilo`byte: has joined #RubyOnRails
[23:32:38] baweaver: has joined #RubyOnRails
[23:34:33] mikeiniowa: has joined #RubyOnRails
[23:34:48] lexileo: has joined #RubyOnRails
[23:35:08] truenito: has joined #RubyOnRails
[23:38:24] Pazician: has joined #RubyOnRails
[23:40:49] peterevjan: has joined #RubyOnRails
[23:40:59] Prasun: has joined #RubyOnRails
[23:42:21] shnooti: has joined #RubyOnRails
[23:42:38] Ropeney: has joined #RubyOnRails
[23:42:47] StaticVoid: has joined #RubyOnRails
[23:42:57] shnooti: Hello. Is it conventional to serve an API and views for that API when accessed from a browser from the same app? Or should I be breaking it up into two apps?
[23:45:56] Denarii: Yes, especially with smaller apps.
[23:52:56] shnooti: ok, perhaps i'll start with that then
[23:55:04] gavinhughes: has joined #RubyOnRails