jjaii9

Activity Graph

Page 1 of 1

2018-08-01

[19:46:57] jjaii9: has joined #RubyOnRails
[19:47:54] jjaii9: howdy folks, a general web (albeit stupid) question, suppose I'm passing a url through a GET request, does the param name 'url' stink? anyone else have anything better? It's the location of git repo, so I was thinking 'repository' but that also seems to kind of smell
[19:54:21] jjaii9: theRoUS: thanks pal
[19:54:32] jjaii9: getting ocd/anxious as shit today hahaha
[20:17:50] jjaii9: Ping timeout: 276 seconds

2018-03-24

[20:14:26] jjaii9: has joined #ruby
[20:15:36] jjaii9: hey is it bad practice for a Ruby console program more or less have one "large" class that holds everything and initialize the class at the bottom, or it typically better to have a separate runner class and/or a rake task to execute things?

2018-03-22

[17:19:52] jjaii9: has joined #ruby

2018-03-21

[17:49:17] jjaii9: has joined #ruby

2018-03-17

[05:48:58] jjaii9: has joined #ruby

2018-03-07

[05:18:27] jjaii9: has joined #ruby
[05:30:45] jjaii9: Read error: Connection reset by peer
[05:31:09] jjaii9: has joined #ruby

2018-01-17

[04:21:22] jjaii9: has joined #ruby

2018-01-16

[19:05:35] jjaii9: has joined #ruby

2017-12-13

[18:08:32] jjaii9: has joined #ruby

2017-10-28

[01:54:20] jjaii9: has joined #ruby
[01:55:14] jjaii9: has joined #RubyOnRails
[01:56:59] jjaii9: does a "back-end service" *always* mean api, or could it just mean the server-side logic of a monolith (client+server in same app)?
[02:06:07] jjaii9: elomatreb: k was thinking that
[02:06:14] jjaii9: elomatreb: thanks u
[03:07:57] jjaii9: Read error: Connection reset by peer
[03:08:31] jjaii9: has joined #ruby
[04:05:25] jjaii9: Read error: Connection reset by peer
[04:05:37] jjaii9: has joined #ruby
[06:23:02] jjaii9: Ping timeout: 258 seconds
[18:43:14] jjaii9: has joined #ruby
[19:19:40] jjaii9: Ping timeout: 258 seconds

2017-10-22

[22:54:28] jjaii9: has joined #ruby
[23:15:59] jjaii9: Ping timeout: 252 seconds

2017-10-10

[13:40:39] jjaii9: has joined #ruby
[14:49:32] jjaii9: Read error: Connection reset by peer
[14:49:55] jjaii9: has joined #ruby
[15:19:48] jjaii9: has joined #RubyOnRails
[15:20:45] jjaii9: hey, I'm trying to change a belongs_to to has_many through and need to swap out prod data, i plan to stick update calls in the migration (after adding the new table, and before dropping the foreign key column), is that the best way? How can I ensure i wont lose data if an update failed? thanks
[15:28:23] jjaii9: Read error: Connection reset by peer
[15:29:03] jjaii9: has joined #ruby
[15:40:51] jjaii9: has joined #RubyOnRails
[15:41:01] jjaii9: hey, I'm trying to change a belongs_to to has_many through and need to swap out prod data, i plan to stick update calls in the migration (after adding the new table, and before dropping the foreign key column), is that the best way? How can I ensure i wont lose data if an update failed? thanks
[15:42:41] jjaii9: Xdega: sorry, I was disconnected. wasn't sure if anyone answered it already :/
[16:05:31] jjaii9: Remote host closed the connection
[16:31:03] jjaii9: has joined #ruby

2017-08-29

[18:51:56] jjaii9: has joined #ruby
[19:00:57] jjaii9: has joined #RubyOnRails
[19:01:07] jjaii9: not a rails specific question, but I got posted this DB design question that made me feel like an idiot, not sure if anyone minds checking it out and giving some input. https://gist.github.com/anonymous/218bf91158d74918d95bb37e0b32df0a

2017-07-06

[12:52:59] jjaii9: has joined #ruby

2017-06-07

[14:14:36] jjaii9: has joined #ruby
[14:14:41] jjaii9: has joined #RubyOnRails
[14:16:54] jjaii9: hey all, I'm trying to decide If i should have an index on a column. Basically the only time it's getting used on it's own more or less is in an instance method that looks like def method col1 || col2 end I tried turning on the logger in the rails console but all it shows is ActiveRecord selecting the entire row (i.e Table.*) so I cant really tell if it's filtering by col1 at all. anyone have any suggestions? thanks
[14:19:10] jjaii9: dminuoso: postgresql
[14:19:41] jjaii9: cool thanks! looking at it now
[14:20:08] jjaii9: although in the rails console I seem unable to get the query
[14:20:15] jjaii9: I put the logger on and all that
[14:20:40] jjaii9: but it seems like whenever I try something like Post.last.title it just logs "SELECT Post.* from posts ..."
[14:20:59] jjaii9: unless that is the actual query and AR is pretty lame
[14:23:44] jjaii9: so probably going to ditch the index
[14:24:14] jjaii9: oh I though Rails was going to select the entire row regardless
[14:24:51] jjaii9: I'm not sure how active record handles it, i'm assuming they do something like `SELECT col1, col2, from posts`
[14:24:57] jjaii9: the method is just
[14:24:59] jjaii9: def method
[14:25:02] jjaii9: col1 || col2
[14:25:27] jjaii9: dminuoso: perhaps not :)
[14:25:41] jjaii9: i was thinking if I had SELECT col1 from posts wth an index that would speed it up
[14:28:56] jjaii9: ah so in this case since it's an instance column and there is ID the index doesn't really matter?
[14:29:02] jjaii9: instance method*
[14:29:41] jjaii9: dminuoso: thanks that helps a lot
[14:29:49] jjaii9: i forgot that
[14:30:21] jjaii9: is there some way to see the actual AR query for the method?
[14:30:30] jjaii9: without just seeing the pre-cached version
[14:32:18] jjaii9: dminuoso: yeah ive seen that, doesnt help here tho
[14:33:01] jjaii9: just using this instance method and see the raw sql
[14:33:10] jjaii9: perhaps AR always does the caching by default?
[14:34:12] jjaii9: dminuoso: so when I run the command with sql logger I get something like SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT $1 [["LIMIT", 1]]
[14:34:26] jjaii9: even though the method is looking for the existence of col1/col2
[14:35:37] jjaii9: tbuehlmann: okay cool
[14:35:40] jjaii9: thanks a lot all

2017-06-06

[09:37:12] jjaii9: has joined #ruby
[09:39:09] jjaii9: has joined #RubyOnRails

2017-06-05

[14:45:44] jjaii9: has joined #ruby
[14:50:48] jjaii9: has joined #RubyOnRails
[14:50:52] jjaii9: I'm adding a column to a table where I will be scanning for it's presence (i.e if it's present I will use that column, if not I will use a different column), I assume that makes it a good candidate for an index? thanks

2017-06-01

[02:52:51] jjaii9: has joined #ruby
[02:57:31] jjaii9: Ping timeout: 255 seconds
[07:15:53] jjaii9: has joined #ruby
[07:19:53] jjaii9: Ping timeout: 240 seconds
[07:26:55] jjaii9: has joined #ruby
[07:58:28] jjaii9: Ping timeout: 272 seconds

2017-05-31

[20:20:50] jjaii9: has joined #ruby
[20:20:56] jjaii9: hey how can I use an instance variable in an eigenclass (class << self)? thanks
[20:21:06] jjaii9: has joined #RubyOnRails
[20:21:09] jjaii9: hey how can I use an instance variable in an eigenclass (class << self)? thanks
[20:24:42] jjaii9: baweaver: sorry! can you give a simple example?
[20:25:05] jjaii9: i'm trying to do something like record = other_method(var)
[20:25:12] jjaii9: and i'm getting record isn't a valid method
[20:26:15] jjaii9: baweaver: omw
[20:29:35] jjaii9: baweaver: https://gist.github.com/anonymous/55e712d5094c109895345156a667e199
[20:30:03] jjaii9: when it hit's record it throws an error like 'undefined local variable or method 'record'
[20:31:26] jjaii9: baweaver: i need to use attr_accessor?
[20:34:44] jjaii9: baweaver: https://gist.github.com/anonymous/2fca87a75f30cbd8d74c364227c946d9
[20:37:38] jjaii9: it was a typo!
[20:37:41] jjaii9: sorry yall
[21:08:28] jjaii9: has joined #ruby
[22:45:47] jjaii9: how u doin
[23:51:14] jjaii9: Remote host closed the connection
[23:51:54] jjaii9: has joined #ruby
[23:56:24] jjaii9: Ping timeout: 240 seconds

2017-05-05

[02:10:45] jjaii9: has joined #RubyOnRails
[02:11:55] jjaii9: is it possible to "insert" into window.history and URL (with pushState/replaceState) so that when clicking the back button (i.e popstate event) they'll go to that URL instead of the previous URL in the history? thanks