hahuang65

Activity Graph

Page 1 of 25 | Next »

2019-09-04

[22:03:06] hahuang65: what's the recommended way to do bulk inserts with ActiveRecord these days (if there is a recommended way at all)

2019-08-22

[00:56:30] hahuang65: *.net *.split
[01:13:37] hahuang65: has joined #RubyOnRails
[01:13:50] hahuang65: has joined #ruby
[01:14:07] hahuang65: has joined #elixir-lang

2019-07-07

[06:08:04] hahuang65: *.net *.split
[06:18:25] hahuang65: has joined #RubyOnRails
[06:18:29] hahuang65: has joined #elixir-lang
[06:18:30] hahuang65: has joined #ruby
[08:21:28] hahuang65: Ping timeout: 252 seconds
[08:23:39] hahuang65: has joined #elixir-lang
[08:23:39] hahuang65: has joined #RubyOnRails
[08:23:47] hahuang65: has joined #ruby
[08:23:59] hahuang65: Max SendQ exceeded
[08:24:14] hahuang65: has joined #elixir-lang
[08:24:14] hahuang65: has joined #RubyOnRails
[08:24:23] hahuang65: has joined #ruby

2019-06-27

[00:06:29] hahuang65: *.net *.split
[00:07:01] hahuang65: has joined #elixir-lang
[00:07:07] hahuang65: has joined #ruby
[00:07:44] hahuang65: has joined #RubyOnRails

2019-06-20

[17:03:16] hahuang65: Inside what areyou trying to do
[22:57:07] hahuang65: that... was bizarre.

2019-06-19

[21:07:47] hahuang65: Net can you pastie that somewhere? it's unclear what you're asking

2019-06-03

[12:42:42] hahuang65: Ping timeout: 250 seconds
[12:43:01] hahuang65: has joined #elixir-lang
[12:43:01] hahuang65: has joined #RubyOnRails
[12:43:05] hahuang65: has joined #ruby

2019-05-24

[07:38:23] hahuang65: Ping timeout: 252 seconds
[07:43:26] hahuang65: has joined #elixir-lang
[07:43:26] hahuang65: has joined #RubyOnRails
[07:43:34] hahuang65: has joined #ruby
[07:44:21] hahuang65: Max SendQ exceeded
[07:44:40] hahuang65: has joined #elixir-lang
[07:44:40] hahuang65: has joined #RubyOnRails
[07:44:45] hahuang65: has joined #ruby

2019-05-20

[06:47:59] hahuang65: Write error: Connection reset by peer
[06:48:12] hahuang65: has joined #elixir-lang
[06:48:12] hahuang65: has joined #RubyOnRails
[06:48:16] hahuang65: has joined #ruby

2019-05-14

[16:35:06] hahuang65: FrankDW yeah just look up Sidekiq.

2019-05-13

[21:31:26] hahuang65: FrankDW I would probably use some kind of job queue mechanism that supports time-based jobs, like you schedule a job for 5 minutes. Then if a new thing comes in, you can delete the scheduled job, if it hasn't been performed yet.

2019-05-01

[23:35:51] hahuang65: I vaguely remember there was a way to set up rspec to do certain things for certain types of tests... for example, always set a request header for controller specs... anyone remember how to do this?

2019-04-29

[20:50:10] hahuang65: IGnorAND yeah. I used to just run it directly on the dev machine, but now I run it thru docker on the dev machine.
[20:51:20] hahuang65: IGnorAND well, I'll usually still have the dev libraries installed for the database, because whatever db adapter usually needs those to compile, but the running database would just be in docker.
[20:51:49] hahuang65: pretty much, I set up a `docker-compose.yml` file for each of my projects, and have ALL the external dependencies live in there, like db, redis, elasticsearch, nginx, whatever.
[20:51:58] hahuang65: that way I can start everything up at once with `docker-compose up`.
[20:52:50] hahuang65: docker just runs on my local machine
[20:55:09] hahuang65: cschneid i think template_exists? is an existing method...https://api.rubyonrails.org/classes/ActionView/LookupContext/ViewPaths.html#method-i-template_exists-3F
[20:58:47] hahuang65: why not use `template_exists?`
[22:05:45] hahuang65: cschneid i think you can just straight call `template_exists?`, but you should try it and see

2019-04-28

[01:04:25] hahuang65: hmm what's the best way to add a method to an existing standard lib class, or actually in this case, ActiveModel::Errors, not a standard lib class.

2019-04-26

[04:25:34] hahuang65: has joined #RubyOnRails
[04:25:46] hahuang65: hey guys, what's the situation with /lib in Rails 5.2
[04:25:55] hahuang65: Is it no longer recommended to have a /lib folder?
[04:40:28] hahuang65: i guess a better question is.. where do singleton modules that are intended to work in the app belong

2019-04-22

[20:53:57] hahuang65: Ping timeout: 252 seconds
[20:58:01] hahuang65: has joined #elixir-lang
[20:58:05] hahuang65: has joined #ruby
[20:59:00] hahuang65: Max SendQ exceeded
[21:14:21] hahuang65: has joined #elixir-lang
[21:14:28] hahuang65: has joined #ruby

2019-04-13

[00:27:18] hahuang65: Ping timeout: 258 seconds
[00:44:05] hahuang65: has joined #elixir-lang
[00:44:12] hahuang65: has joined #ruby
[16:49:40] hahuang65: *.net *.split

2019-04-08

[21:22:22] hahuang65: cthulchu_ occassionally. depends on what I'm doing.
[21:32:43] hahuang65: cthulchu_ I don't use flush in anything production. i mainly use it in local scripts. I've never noticed it change the timing or order of logs, but I suppose it's possible.

2019-03-27

[03:04:22] hahuang65: Quit: ZNC - https://znc.in
[03:27:35] hahuang65: has joined #RubyOnRails
[03:27:35] hahuang65: has joined #ruby
[03:27:35] hahuang65: has joined #elixir-lang
[04:03:12] hahuang65: Quit: ZNC - https://znc.in
[04:05:02] hahuang65: has joined #elixir-lang
[04:05:03] hahuang65: has joined #RubyOnRails
[04:05:03] hahuang65: has joined #ruby
[04:10:21] hahuang65: Quit: ZNC - https://znc.in
[04:13:20] hahuang65: has joined #RubyOnRails
[04:13:20] hahuang65: has joined #ruby
[04:13:20] hahuang65: has joined #elixir-lang
[05:11:16] hahuang65: Quit: ZNC - https://znc.in
[05:13:28] hahuang65: has joined #elixir-lang
[05:15:05] hahuang65: Client Quit
[05:15:48] hahuang65: has joined #elixir-lang
[05:15:59] hahuang65: Client Quit
[05:16:13] hahuang65: has joined #elixir-lang
[05:20:05] hahuang65: Client Quit
[05:20:46] hahuang65: has joined #elixir-lang
[05:33:02] hahuang65: has joined #ruby
[06:37:51] hahuang65: sms: you can use https://hexdocs.pm/elixir/Kernel.SpecialForms.html#__MODULE__/0
[06:38:18] hahuang65: unless im misunderstanding your question
[06:43:53] hahuang65: sms: i don't think i understand what you're trying to do
[06:44:13] hahuang65: and it's actually really late here so I'm having a hard time thinking lol...
[06:48:27] hahuang65: yeah, doesn't `__MODULE__` get you that?

2019-03-25

[17:17:06] hahuang65: Ping timeout: 250 seconds
[18:40:00] hahuang65: has joined #RubyOnRails
[18:40:00] hahuang65: has joined #ruby
[18:40:00] hahuang65: has joined #elixir-lang

2019-03-22

[04:48:16] hahuang65: AgelZ: what's your question?
[04:55:02] hahuang65: AgelZ: what do you mean gems won'
[04:55:40] hahuang65: post us a pastie of your problem, instead of speaking in generalizations. We can't really help if we don't understand what the problem is
[05:05:40] hahuang65: AgelZ: i have no idea how to help you if you won't give me details... What is the problem?
[05:51:59] hahuang65: AgelZ: put your code in a pastebin dude.
[05:55:52] hahuang65: AgelZ: okay, last time I'm gonna say this. Please tell me what the issue is. I don't want to read through your entire project codebase. Tell me what the issue is so I can figure out where to start.
[05:59:01] hahuang65: AgelZ: okay, so I understand your goal. You want to write tests for this code.
[05:59:13] hahuang65: AgelZ: now, what is the problem? Why can't you write the tests?
[06:00:10] hahuang65: AgelZ: what did you try?
[06:01:44] hahuang65: AgelZ: what vim command did people suggest
[06:04:41] hahuang65: AgelZ: have you written any tests for any code before?
[06:05:26] hahuang65: AgelZ: have you written code before?
[06:06:32] hahuang65: AgelZ: have you written Sinatra code before?
[06:08:01] hahuang65: AgelZ: I'm going to send you a link, because no one here is really going to have time to basically walk you thru your assignment
[06:08:11] hahuang65: AgelZ: but hopefully this link will be helpful in getting you started on testing
[06:08:13] hahuang65: http://sinatrarb.com/testing.html
[06:09:02] hahuang65: AgelZ: I will HIGHLY recommend, ignoring your project code for now... Walk thru that testing tutorial, understand how things work, then apply it to your project
[06:09:08] hahuang65: AgelZ: good luck
[06:09:26] hahuang65: I'm signing out for tonight, but I will be around tomorrow, if you have some specific questions
[06:14:26] hahuang65: AgelZ: sure. Sinatra might be a little confusing at first too, so you might want to search for "Ruby Test Driven Development Tutorial" as well just to get familiar with testing Ruby

2019-03-20

[20:18:48] hahuang65: Ping timeout: 245 seconds
[20:23:38] hahuang65: has joined #elixir-lang
[20:23:39] hahuang65: has joined #RubyOnRails
[20:23:39] hahuang65: has joined #ruby

2019-03-19

[17:43:04] hahuang65: Net: is this on your local dev env?
[17:44:18] hahuang65: Net: it might just be config.logger
[17:45:15] hahuang65: oh config.active_record.logger should still work. Hate to be that guy but did you reboot your server?
[18:01:19] hahuang65: Net: I'd guess it loads those later than when it's needed.

2019-03-18

[17:22:48] hahuang65: Ping timeout: 246 seconds
[17:24:06] hahuang65: has joined #RubyOnRails
[17:24:06] hahuang65: has joined #ruby
[17:24:06] hahuang65: has joined #elixir-lang
[17:31:12] hahuang65: Ping timeout: 246 seconds
[17:34:30] hahuang65: has joined #RubyOnRails
[17:34:30] hahuang65: has joined #ruby
[17:34:30] hahuang65: has joined #elixir-lang
[17:41:20] hahuang65: Ping timeout: 272 seconds
[17:43:51] hahuang65: has joined #RubyOnRails
[17:43:51] hahuang65: has joined #ruby
[17:43:51] hahuang65: has joined #elixir-lang
[17:44:08] hahuang65: Client Quit
[17:46:37] hahuang65: has joined #RubyOnRails
[17:46:37] hahuang65: has joined #ruby
[17:46:37] hahuang65: has joined #elixir-lang

2019-03-16

[00:12:50] hahuang65: funkytwig: it's minimum: 5, maximum: 255
[00:34:21] hahuang65: funkytwig: dude, you need a : after the symbols in your hash.
[00:34:31] hahuang65: { minimum: 5 }, not { minimum 5 }

2019-03-15

[16:59:22] hahuang65: funkytwig: depends on your database.yml and how you set it up.
[17:34:40] hahuang65: yeah that SHOULDN'T be your root password.
[17:34:54] hahuang65: but it CAN be if you configure it that way.
[17:35:20] hahuang65: funkytwig: I think it defaults to no password, and user is postgres.
[17:41:32] hahuang65: funkytwig: you can ask here... it's generally a little more populated than this, but if you stick around, someone usually answers.
[23:51:15] hahuang65: Quit: ZNC - https://znc.in
[23:52:28] hahuang65: has joined #RubyOnRails
[23:52:28] hahuang65: has joined #ruby
[23:52:28] hahuang65: has joined #elixir-lang
[23:57:09] hahuang65: Client Quit
[23:58:45] hahuang65: has joined #RubyOnRails
[23:58:45] hahuang65: has joined #ruby
[23:58:45] hahuang65: has joined #elixir-lang

2019-03-14

[04:35:25] hahuang65: Ping timeout: 255 seconds
[05:56:36] hahuang65: has joined #RubyOnRails
[05:56:36] hahuang65: has joined #ruby
[05:56:36] hahuang65: has joined #elixir-lang
[06:08:48] hahuang65: Ping timeout: 245 seconds
[09:45:31] hahuang65: has joined #RubyOnRails
[09:45:31] hahuang65: has joined #ruby
[09:45:31] hahuang65: has joined #elixir-lang
[09:57:12] hahuang65: Ping timeout: 250 seconds
[12:32:20] hahuang65: has joined #RubyOnRails
[12:32:20] hahuang65: has joined #ruby
[12:32:20] hahuang65: has joined #elixir-lang
[16:45:07] hahuang65: Quit: ZNC - https://znc.in
[16:46:19] hahuang65: has joined #elixir-lang
[16:46:20] hahuang65: has joined #RubyOnRails
[16:46:20] hahuang65: has joined #ruby
[18:54:38] hahuang65: Ping timeout: 272 seconds
[19:20:18] hahuang65: has joined #RubyOnRails
[19:20:18] hahuang65: has joined #ruby
[19:20:18] hahuang65: has joined #elixir-lang

2019-03-12

[17:32:05] hahuang65: duleja: what are your reasons for requiring the session data in the model?
[17:37:30] hahuang65: sorry, I'm a little confused here.. you have geolocation data in session store, but need it in default_scope?
[17:42:40] hahuang65: can you just make a "fake" default_scope in the controller, where you do like @user = User.find(x).with_geo(lat: lat, long: long) and then basically return a user with a scope attached to that object, and use @user everywhere?
[17:43:26] hahuang65: like, just make a named scoped, and attach that to the User in the controller
[17:47:22] hahuang65: i don't see why that's the case...
[17:47:24] hahuang65: what if there are 2 users?
[17:48:56] hahuang65: the controller calls everything for the view/api. I don't see how attaching a scope to the @user variable won't be able to hit all the queries you need changed.
[17:49:09] hahuang65: you're always going to be passing that @user to everything that needs to run a query, right?

2019-03-11

[23:23:46] hahuang65: Radar: HELLO
[23:24:56] hahuang65: how's it going

2019-03-09

[01:35:12] hahuang65: I can't do def update(struct(__MODULE__) = obj, attrs) do can i?
[01:35:19] hahuang65: is there a workaround
[01:35:46] hahuang65: derp. that works?
[01:37:07] hahuang65: nah, doesn't work

2019-03-07

[20:59:16] hahuang65: Quit: ZNC - https://znc.in
[21:01:54] hahuang65: has joined #RubyOnRails
[21:01:54] hahuang65: has joined #ruby
[21:01:54] hahuang65: has joined #elixir-lang
[21:07:08] hahuang65: Ping timeout: 244 seconds
[21:19:37] hahuang65: has joined #RubyOnRails
[21:19:37] hahuang65: has joined #ruby
[21:19:37] hahuang65: has joined #elixir-lang

2019-03-06

[03:13:22] hahuang65: Ping timeout: 245 seconds
[03:13:54] hahuang65: has joined #RubyOnRails
[03:13:54] hahuang65: has joined #ruby
[03:13:54] hahuang65: has joined #elixir-lang
[03:27:54] hahuang65: Quit: ZNC - https://znc.in
[03:29:03] hahuang65: has joined #RubyOnRails
[03:29:03] hahuang65: has joined #ruby
[03:29:03] hahuang65: has joined #elixir-lang
[04:13:58] hahuang65: sagax: you can maybe use the after_find callback.

2019-03-05

[20:01:12] hahuang65: Radar: sup my dood
[21:17:59] hahuang65: Radar: you're in AUS right?
[21:18:13] hahuang65: man I'd love to visit Sydney and Melbourne
[21:19:00] hahuang65: Radar: wow I've actually never heard of that site before.

2019-02-28

[21:04:14] hahuang65: what would be the best way to include a method from another module in ApplicationHelper
[21:08:01] hahuang65: Radar: in lib/
[21:08:35] hahuang65: Radar: what if I don't want any other methods from that module?
[21:09:05] hahuang65: Radar: haha
[21:09:34] hahuang65: Radar: yeah so do I
[21:10:02] hahuang65: Radar: my use case is basically, I have a module for a 3rd party integration that has a lot of methods. One of which I want in ApplicationHelper so that I can derive a URL
[21:10:15] hahuang65: perhaps the best way is to just have a method call the other module's method.
[21:11:21] hahuang65: Radar: well this part I'm specifically using for a CSV export
[21:11:37] hahuang65: so it renders in CSV, rather than a page
[21:12:23] hahuang65: I suppose I could just call MyModule.my_method in the view...
[21:12:54] hahuang65: I think I'm over-engineering this in my head ha
[21:13:27] hahuang65: thanks for bouncing around ideas with me
[21:13:31] hahuang65: appreciate it as always

2019-02-27

[22:23:19] hahuang65: Quit: ZNC - https://znc.in
[22:26:00] hahuang65: has joined #RubyOnRails
[22:26:00] hahuang65: has joined #ruby
[22:52:05] hahuang65: Quit: ZNC - https://znc.in
[22:54:35] hahuang65: has joined #RubyOnRails
[22:54:35] hahuang65: has joined #ruby

2019-02-25

[21:50:01] hahuang65: has joined #ruby
[21:50:02] hahuang65: has joined #RubyOnRails

2019-02-23

[01:13:31] hahuang65: has joined #RubyOnRails
[01:15:57] hahuang65: Client Quit
[01:17:01] hahuang65: has joined #RubyOnRails
[01:17:01] hahuang65: has joined #ruby
[05:50:04] hahuang65: hmm can someone explain to me why rails is connecting thru TCP socket when I don't have the host and port lines uncommented in database.yml?
[05:50:21] hahuang65: Trying to figure out why on my laptop it's doing that, but on my desktop, it's looking for domain socket by default.
[05:50:23] hahuang65: same project
[06:04:18] hahuang65: nm, figured it out. It was `PGHOST` and `PGUSER` being set.
[07:40:44] hahuang65: Quit: ZNC - https://znc.in