habitullence

Activity Graph

Page 1 of 5 | Next »

2017-03-17

[02:08:20] habitullence: Ping timeout: 240 seconds
[20:59:11] habitullence: Quit: habitullence

2017-03-16

[09:16:45] habitullence: has joined #ruby
[09:16:45] habitullence: has joined #RubyOnRails
[21:39:28] habitullence: Ping timeout: 240 seconds

2017-03-15

[16:16:44] habitullence: has joined #ruby
[16:16:44] habitullence: has joined #RubyOnRails
[16:17:52] habitullence: Probably a newbie question but how would you do an OR but test all conditions? e.g., cond1 || cond2 but I want cond2 to be run regardless of result of cond1
[16:23:14] habitullence: hxegon: https://gist.github.com/habitullence/fcb822c72caeef738e7ac04335c43e06
[16:25:15] habitullence: hxegon: mais qui
[16:27:58] habitullence: hxegon: how come?
[16:29:03] habitullence: hxegon: it does
[16:29:27] habitullence: hxegon: maybe refactoring will reveal the solution then
[16:35:12] habitullence: hexgon: I see where you’re going with it, thanks. I’ll role out another solution. Hopefully you’re around in a few mins?
[19:59:15] habitullence: Ping timeout: 268 seconds
[21:31:12] habitullence: Quit: habitullence

2017-03-09

[12:39:29] habitullence: has joined #ruby
[12:39:29] habitullence: has joined #RubyOnRails
[12:40:08] habitullence: Can someone tell me why resource :tests, :only => :update doesn’t create test_path(:id)?
[12:40:41] habitullence: From the routing docs looks like it should but I’m getting no method in tests.
[12:44:32] habitullence: Never mind, going to be explicit. Rails seems to think that PATCH & PUT are interchangable anyway, which isn’t ideal.
[12:44:37] habitullence: Quit: habitullence

2016-07-23

[04:18:52] habitullence: Ping timeout: 252 seconds

2016-07-22

[21:49:44] habitullence: Quit: habitullence
[21:58:03] habitullence: has joined #ruby
[21:58:03] habitullence: has joined #RubyOnRails

2016-07-11

[15:19:27] habitullence: has joined #ruby
[15:19:27] habitullence: has joined #RubyOnRails

2016-05-31

[13:29:23] habitullence: Quit: habitullence

2016-05-29

[20:23:29] habitullence: Ping timeout: 260 seconds

2016-05-28

[15:28:23] habitullence: Read error: No route to host
[15:28:38] habitullence: has joined #ruby
[15:28:38] habitullence: has joined #RubyOnRails

2016-05-26

[14:31:35] habitullence: How to deal with unexpected values? Should I put in a guard or use exceptions? Suggestions...
[14:34:21] habitullence: I might need the eight lines though, wisdom that is beyond my grasp
[14:35:35] habitullence: from great beer, comes great wisdom
[14:35:47] habitullence: and from great wisdom, comes great beer
[14:42:49] habitullence: Vlat, I see what you're getting at.. I guess it comes down simply to what you consider an exception and where it can be dealt with. If you can deal with it locally, then do so, otherwise you need to throw it up the chain.
[14:43:08] habitullence: Sounds like a sensible approach
[14:47:16] habitullence: Vlat: sounds right, thanks

2016-05-25

[14:57:30] habitullence: Ping timeout: 276 seconds
[14:58:31] habitullence: has joined #ruby
[14:58:31] habitullence: has joined #RubyOnRails

2016-05-24

[11:07:26] habitullence: Quit: habitullence
[11:15:24] habitullence: has joined #ruby
[11:15:24] habitullence: has joined #RubyOnRails
[14:42:37] habitullence: *.net *.split
[15:45:54] habitullence: has joined #ruby
[15:45:55] habitullence: has joined #RubyOnRails
[15:57:33] habitullence: *.net *.split
[16:06:16] habitullence: has joined #ruby
[16:06:17] habitullence: has joined #RubyOnRails
[18:16:41] habitullence: Ping timeout: 258 seconds

2016-05-21

[17:40:08] habitullence: Hi guys, looking for someone to critique my code https://gist.github.com/habitullence/b416782da630b829e01de28a032c046a
[17:41:56] habitullence: I guess there's probably no way of writing that to make it more concise
[17:47:44] habitullence: jhass: thanks. Yeah, it's a snippet from inside a method.
[17:47:50] habitullence: How do you mean?
[17:50:34] habitullence: Yes, so there's an lb you don't see here and this is a list of upstream app servers
[17:51:31] habitullence: I guess what I was wondering is if there's a way of magically combining these two lines so I'm not referring to the same variable three times, just define it once.
[17:52:54] habitullence: That would mean having a method like rotate that took the IP header instead
[17:53:46] habitullence: it's proxying round robin though so for the test I'd have to go through in order
[17:54:10] habitullence: i.e., I need the current proxy to be at the start
[17:55:08] habitullence: jhass: am I explaining properly
[17:56:30] habitullence: Thanks, I get caught up on the little things a lot.

2016-05-20

[18:30:27] habitullence: has joined #ruby
[18:30:49] habitullence: How would you loop over an array indefinitely?
[18:31:53] habitullence: jhass: perfect, thank you
[18:33:33] habitullence: jhass: is there a way to give it a starting point?
[18:34:04] habitullence: jhass: ah sorry, nm http://stackoverflow.com/questions/26597835/set-starting-point-for-cycle

2016-05-18

[05:12:55] habitullence: Ping timeout: 246 seconds
[19:36:34] habitullence: Quit: habitullence
[19:36:57] habitullence: has joined #RubyOnRails

2016-05-13

[09:34:25] habitullence: has joined #RubyOnRails
[18:17:27] habitullence: Ping timeout: 276 seconds

2016-05-12

[08:32:16] habitullence: has joined #RubyOnRails
[08:42:32] habitullence: Quit: habitullence
[11:02:21] habitullence: has joined #RubyOnRails
[14:01:48] habitullence: Quit: habitullence
[15:33:12] habitullence: has joined #RubyOnRails
[20:38:44] habitullence: Quit: habitullence

2016-05-11

[11:13:02] habitullence: has joined #RubyOnRails
[14:13:41] habitullence: Quit: habitullence

2016-05-10

[02:15:29] habitullence: Quit: habitullence
[08:03:29] habitullence: has joined #RubyOnRails
[08:14:29] habitullence: Quit: habitullence
[08:17:05] habitullence: has joined #RubyOnRails
[08:28:36] habitullence: Quit: habitullence
[10:56:53] habitullence: has joined #RubyOnRails
[12:59:48] habitullence: Quit: habitullence
[13:00:08] habitullence: has joined #RubyOnRails
[13:41:10] habitullence: Quit: habitullence
[15:06:05] habitullence: has joined #RubyOnRails
[20:00:05] habitullence: Quit: habitullence
[20:50:40] habitullence: has joined #RubyOnRails
[21:10:13] habitullence: Quit: habitullence

2016-05-09

[07:49:17] habitullence: has joined #RubyOnRails
[12:48:36] habitullence: Quit: habitullence
[14:36:44] habitullence: has joined #RubyOnRails
[16:48:58] habitullence: Quit: habitullence
[17:20:31] habitullence: has joined #RubyOnRails
[17:31:54] habitullence: Quit: habitullence
[18:01:41] habitullence: has joined #RubyOnRails
[20:32:53] habitullence: Quit: habitullence
[20:39:30] habitullence: has joined #RubyOnRails
[23:10:25] habitullence: Quit: habitullence
[23:16:36] habitullence: has joined #RubyOnRails

2016-05-08

[00:47:51] habitullence: Quit: habitullence
[08:48:58] habitullence: has joined #RubyOnRails
[13:24:51] habitullence: Quit: habitullence
[14:31:01] habitullence: has joined #RubyOnRails
[15:30:17] habitullence: Ping timeout: 260 seconds
[22:48:40] habitullence: Quit: habitullence

2016-05-07

[02:23:19] habitullence: Quit: habitullence
[12:03:18] habitullence: has joined #RubyOnRails
[16:53:52] habitullence: Quit: habitullence
[17:07:09] habitullence: has joined #RubyOnRails

2016-05-06

[08:49:13] habitullence: has joined #RubyOnRails

2016-05-05

[04:46:16] habitullence: Quit: habitullence
[10:57:36] habitullence: has joined #RubyOnRails
[15:48:49] habitullence: Quit: habitullence

2016-05-04

[07:38:38] habitullence: has joined #RubyOnRails
[14:24:18] habitullence: Ping timeout: 246 seconds
[18:06:16] habitullence: Quit: habitullence
[18:53:27] habitullence: has joined #RubyOnRails

2016-05-03

[18:13:54] habitullence: has joined #RubyOnRails
[19:42:19] habitullence: *.net *.split
[19:51:38] habitullence: has joined #RubyOnRails
[23:58:17] habitullence: Quit: habitullence

2016-05-02

[14:28:03] habitullence: Ping timeout: 240 seconds
[14:28:34] habitullence: has joined #RubyOnRails
[19:15:15] habitullence: Quit: habitullence

2016-05-01

[14:15:57] habitullence: has joined #RubyOnRails
[14:16:25] habitullence: has joined #RubyOnRails

2016-01-26

[18:28:07] habitullence: has joined #RubyOnRails
[18:29:29] habitullence: If I'm doing a request spec on a controller that's used as parent for engine, does anyone know why I get /engien/url/app/url when I use main_app.root_url?
[18:29:37] habitullence: Been bugging me all day
[18:33:18] habitullence: Probably not that easy just need one clue out of 600 brains
[18:36:26] habitullence: Thanks AnomalousBit.. It's more like a test running in an engine is doing something that I didn't expect with redirect_to.. My debugger was broken earlier, tomorrow I'll get it fixed and start going through source to see what's going on
[18:37:27] habitullence: main_app.something_path works in the engine controller just not in the test. Very little around on testing engine integration.. Head scratching will continue
[18:52:47] habitullence: Quit: habitullence
[19:40:56] habitullence: has joined #RubyOnRails

2015-10-12

[00:12:24] habitullence: Quit: habitullence
[08:38:29] habitullence: has joined #RubyOnRails
[09:01:50] habitullence: Quit: habitullence
[09:03:06] habitullence: has joined #RubyOnRails
[09:08:31] habitullence: Ping timeout: 240 seconds

2015-10-11

[01:59:46] habitullence: has joined #RubyOnRails
[03:53:49] habitullence: Quit: habitullence
[06:42:16] habitullence: has joined #RubyOnRails

2015-10-10

[07:58:55] habitullence: has joined #RubyOnRails
[18:17:08] habitullence: Quit: habitullence

2015-10-09

[09:41:42] habitullence: has joined #RubyOnRails
[12:09:37] habitullence: does anyone know how to use each with squeel?
[13:05:09] habitullence: Does anyone know why when I try and called each on a relation I get undefined method each? I'm using squeel to query so presumably have to do something to it before iterating
[13:05:21] habitullence: GADMBoundary.select { [distinct(:id_1), '*' ]}
[13:06:07] habitullence: Do I need to use to_a?
[13:08:13] habitullence: OK that didn't work...
[14:11:18] habitullence: Quit: habitullence
[14:42:12] habitullence: has joined #RubyOnRails
[15:09:36] habitullence: Quit: habitullence
[16:03:15] habitullence: has joined #RubyOnRails
[16:51:21] habitullence: Hellllllllp..... GADMBoundary.select { ['DISTINCT ON(id_1) id_1', '*' ]}.each gives method not found... GADMBoundary.select { ['DISTINCT ON(id_1) id_1', '*' ]}.methods lists each!!!
[16:55:55] habitullence: gerep: GADMBoundary::ActiveRecord_Relation
[16:57:58] habitullence: gerep: that's what I thought, don't know why it shows up in methods.. Do you know how I iterate this thing? I've tried to_a already and all
[17:02:06] habitullence: gerep: I'm getting no method
[17:03:47] habitullence: ok I get a bunch of records
[17:05:41] habitullence: gerep: ah that I can iterate... I just need it to work with my query which uses distinct on rather than distinct
[17:06:27] habitullence: gerep: the class is the same though GADMBoundary::ActiveRecord_Relation!!!
[17:08:16] habitullence: gerep: put to_sql straight into command line and it works
[17:09:58] habitullence: gerep: ah the other works as well from console... must be something to do with rake task :)
[17:11:44] habitullence: gerep: no problem :) I'm looking at what can be wrong with rake task cause it acts different from console. On console my orginial code works :S
[17:16:37] habitullence: gerep: errr now it works in rake task... I can only assume it was some weird postgres caching thing :S
[17:20:25] habitullence: gerep: hmm kinda lol thanks though :)
[17:20:38] habitullence: seems to be another problem :S
[18:31:25] habitullence: Quit: habitullence

2015-10-08

[00:56:46] habitullence: Quit: habitullence
[08:11:43] habitullence: has joined #RubyOnRails
[13:58:58] habitullence: Anyone know how to use * in squeel?
[14:04:36] habitullence: select * in squeel... anybody?
[14:05:45] habitullence: rvanlieshout: so string? doesn't seem very squeelish
[14:05:58] habitullence: oh! hit and run :P
[16:06:34] habitullence: Quit: habitullence
[16:41:15] habitullence: has joined #RubyOnRails
[17:03:46] habitullence: Quit: habitullence

2015-10-07

[12:19:05] habitullence: Quit: habitullence
[12:24:45] habitullence: has joined #RubyOnRails

2015-10-06

[10:23:58] habitullence: Hi, how should I do seed data for a rails engine?
[13:13:00] habitullence: Quit: habitullence
[13:21:15] habitullence: has joined #RubyOnRails

2015-10-05

[03:29:55] habitullence: Quit: habitullence
[08:19:27] habitullence: has joined #RubyOnRails
[09:59:49] habitullence: Quit: habitullence
[11:23:36] habitullence: has joined #RubyOnRails

2015-10-04

[08:40:39] habitullence: Quit: habitullence
[09:25:07] habitullence: has joined #RubyOnRails
[10:43:59] habitullence: Quit: habitullence
[11:06:21] habitullence: has joined #RubyOnRails
[11:36:03] habitullence: Quit: habitullence
[16:43:47] habitullence: has joined #RubyOnRails

2015-10-03

[08:48:50] habitullence: has joined #RubyOnRails
[15:26:51] habitullence: Quit: habitullence
[15:28:23] habitullence: has joined #RubyOnRails
[18:11:42] habitullence: Quit: habitullence
[21:57:36] habitullence: has joined #RubyOnRails

2015-10-02

[15:00:51] habitullence: Anyone know how to add tables to from clause in arel?
[15:03:21] habitullence: hey tubbo... neither do I ;P
[15:05:34] habitullence: tubbo: I basically have poly geom in one table and point geom in another, I'm trying to say get me all points for whatever polygons, i.e., multi-model scope. Does that make any sense? :S
[15:45:33] habitullence: Does anyone know how to use arel project in activerecord scope?
[15:47:01] habitullence: or how to turn selectmanager into scope
[15:53:10] habitullence: ok geniuses, how do you change select in a scope?
[16:05:53] habitullence: Anyone know how to use arel project in scopes?
[16:07:07] habitullence: hi smathy, when I use project(...) I don't get records but arel::selectmanager returned
[16:08:36] habitullence: thanks smathy, https://gist.github.com/habitullence/8e4aa3bfcbbc7c1ba31d
[16:12:28] habitullence: smathy, I basically need to add sites to from clause
[16:16:44] habitullence: should the scope be on sites?
[16:16:54] habitullence: and I pass in adminbound or something?
[16:17:44] habitullence: smathy, SELECT * FROM public.sites, public.gadm WHERE public.gadm.iso = 'BRA' AND st_contains(gadm.geom, sites.lonlat::geometry)
[16:18:41] habitullence: gadm changed to adminbonuds
[16:19:10] habitullence: SELECT * FROM public.sites, public.admin_bounds WHERE public.admin_bounds.iso = 'BRA' AND st_contains(admin_bounds.geom, sites.lonlat::geometry)
[16:20:57] habitullence: smathy, a join I think
[16:21:32] habitullence: just all the records?
[16:22:14] habitullence: smathy, so is my query badly formed?
[16:22:39] habitullence: I just want all the points for the admin_bound
[16:24:02] habitullence: smathy, so really I should have the scope on sites and pass it the adminbound?
[16:26:06] habitullence: smathy, that makes a lot more sense.. As I'm using two models should I create a service kind of object or would you just pass between the two?
[16:29:55] habitullence: smathy, will do. So I can use joins without foreign keys?
[16:31:37] habitullence: lol thanks smathy :)
[16:43:23] habitullence: smathy, association basics all looks pretty familiar, was there something in particular?
[16:50:33] habitullence: smathy, I don't think that.. I was wondering if I can use postgis types as foreign keys if anything ;)
[16:51:10] habitullence: I'm going to look at that and also moving the scope definition :)
[16:57:23] habitullence: smathy, thanks, I did. Just need to learn more about how postgis types work. Thanks for help, much appreciated :)
[17:08:16] habitullence: Quit: habitullence