brendan6

Activity Graph

Page 1 of 2 | Next »

2017-04-03

[15:01:18] brendan6: has joined #RubyOnRails

2017-04-01

[04:41:35] brendan6: Ping timeout: 240 seconds
[05:25:38] brendan6: has joined #RubyOnRails
[05:33:46] brendan6: Ping timeout: 246 seconds
[07:38:29] brendan6: has joined #RubyOnRails
[07:42:34] brendan6: Ping timeout: 246 seconds
[09:14:31] brendan6: has joined #RubyOnRails
[09:18:49] brendan6: Ping timeout: 246 seconds
[11:27:22] brendan6: has joined #RubyOnRails
[11:32:09] brendan6: Ping timeout: 268 seconds
[12:43:53] brendan6: has joined #RubyOnRails
[12:48:07] brendan6: Ping timeout: 246 seconds
[15:01:57] brendan6: has joined #RubyOnRails
[15:06:22] brendan6: Ping timeout: 246 seconds
[15:37:30] brendan6: has joined #RubyOnRails
[15:41:43] brendan6: Ping timeout: 246 seconds
[16:39:17] brendan6: has joined #RubyOnRails
[16:43:40] brendan6: Ping timeout: 246 seconds

2017-03-31

[03:17:40] brendan6: has joined #RubyOnRails
[03:22:03] brendan6: Ping timeout: 240 seconds
[07:18:38] brendan6: has joined #RubyOnRails
[07:23:43] brendan6: Ping timeout: 268 seconds
[13:44:15] brendan6: has joined #RubyOnRails

2017-03-30

[00:20:57] brendan6: has joined #RubyOnRails
[00:25:16] brendan6: Ping timeout: 246 seconds
[03:06:11] brendan6: has joined #RubyOnRails
[03:10:28] brendan6: Ping timeout: 246 seconds
[03:35:06] brendan6: has joined #RubyOnRails
[06:18:15] brendan6: Remote host closed the connection
[06:56:19] brendan6: has joined #RubyOnRails
[07:00:46] brendan6: Ping timeout: 246 seconds
[11:19:15] brendan6: has joined #RubyOnRails
[11:23:16] brendan6: Ping timeout: 246 seconds
[12:42:21] brendan6: has joined #RubyOnRails
[12:46:34] brendan6: Ping timeout: 246 seconds
[13:38:48] brendan6: has joined #RubyOnRails
[13:42:40] brendan6: Remote host closed the connection
[13:42:54] brendan6: has joined #RubyOnRails
[13:43:10] brendan6: Remote host closed the connection
[13:43:44] brendan6: has joined #RubyOnRails
[22:20:26] brendan6: Ping timeout: 268 seconds

2017-03-29

[02:57:45] brendan6: has joined #RubyOnRails
[03:02:10] brendan6: Ping timeout: 246 seconds
[03:52:02] brendan6: has joined #RubyOnRails
[03:56:25] brendan6: Ping timeout: 246 seconds
[08:08:06] brendan6: has joined #RubyOnRails
[08:12:16] brendan6: Ping timeout: 246 seconds
[12:50:45] brendan6: has joined #RubyOnRails
[20:29:19] brendan6: Remote host closed the connection
[21:28:07] brendan6: has joined #RubyOnRails
[23:00:35] brendan6: Remote host closed the connection

2017-03-28

[02:08:19] brendan6: has joined #RubyOnRails
[02:12:47] brendan6: Ping timeout: 258 seconds
[04:28:36] brendan6: has joined #RubyOnRails
[04:32:56] brendan6: Ping timeout: 246 seconds
[07:17:59] brendan6: has joined #RubyOnRails
[07:22:20] brendan6: Ping timeout: 246 seconds
[08:28:48] brendan6: has joined #RubyOnRails
[08:33:02] brendan6: Ping timeout: 246 seconds
[09:22:55] brendan6: has joined #RubyOnRails
[09:27:17] brendan6: Ping timeout: 246 seconds
[13:50:51] brendan6: has joined #RubyOnRails
[13:55:34] brendan6: Ping timeout: 264 seconds
[13:56:46] brendan6: has joined #RubyOnRails
[13:56:53] brendan6: Remote host closed the connection
[13:57:26] brendan6: has joined #RubyOnRails
[14:56:08] brendan6: Read error: Connection reset by peer
[15:28:16] brendan6: has joined #RubyOnRails
[15:33:08] brendan6: Read error: Connection reset by peer
[15:34:43] brendan6: has joined #RubyOnRails
[15:34:50] brendan6: Read error: Connection reset by peer
[15:35:19] brendan6: has joined #RubyOnRails
[15:37:22] brendan6: Read error: Connection reset by peer
[15:37:54] brendan6: has joined #RubyOnRails
[15:39:39] brendan6: Read error: Connection reset by peer
[15:41:00] brendan6: has joined #RubyOnRails
[15:50:13] brendan6: Read error: Connection reset by peer
[15:50:30] brendan6: has joined #RubyOnRails
[15:50:38] brendan6: Read error: Connection reset by peer
[15:52:06] brendan6: has joined #RubyOnRails
[15:56:44] brendan6: Read error: Connection reset by peer
[15:56:54] brendan6: has joined #RubyOnRails
[16:13:07] brendan6: Read error: Connection reset by peer
[16:17:07] brendan6: has joined #RubyOnRails
[18:30:53] brendan6: Read error: Connection reset by peer
[18:31:21] brendan6: has joined #RubyOnRails
[19:03:23] brendan6: Read error: Connection reset by peer
[19:04:10] brendan6: has joined #RubyOnRails
[19:11:47] brendan6: Read error: Connection reset by peer
[19:12:17] brendan6: has joined #RubyOnRails
[19:15:46] brendan6: Read error: Connection reset by peer
[19:15:55] brendan6: has joined #RubyOnRails
[19:39:19] brendan6: Read error: Connection reset by peer
[19:39:41] brendan6: has joined #RubyOnRails
[22:04:23] brendan6: Read error: Connection reset by peer
[22:04:35] brendan6: has joined #RubyOnRails
[22:08:55] brendan6: Read error: Connection reset by peer
[22:10:52] brendan6: has joined #RubyOnRails
[22:13:23] brendan6: Read error: Connection reset by peer
[22:13:41] brendan6: has joined #RubyOnRails
[22:19:34] brendan6: Read error: Connection reset by peer
[22:19:48] brendan6: has joined #RubyOnRails
[22:22:09] brendan6: Read error: Connection reset by peer
[22:23:04] brendan6: has joined #RubyOnRails
[23:04:31] brendan6: Ping timeout: 246 seconds
[23:22:02] brendan6: has joined #RubyOnRails
[23:26:49] brendan6: Ping timeout: 260 seconds

2017-03-27

[18:40:07] brendan6: has joined #RubyOnRails
[22:17:25] brendan6: Ping timeout: 258 seconds
[23:30:16] brendan6: has joined #RubyOnRails
[23:34:23] brendan6: Ping timeout: 246 seconds

2017-03-20

[13:25:43] brendan6: has joined #RubyOnRails

2017-03-18

[09:58:58] brendan6: has joined #RubyOnRails
[10:03:36] brendan6: Ping timeout: 258 seconds

2017-03-17

[20:41:50] brendan6: has joined #RubyOnRails
[20:56:10] brendan6: Remote host closed the connection
[21:01:14] brendan6: has joined #RubyOnRails
[21:03:04] brendan6: Remote host closed the connection
[21:57:36] brendan6: has joined #RubyOnRails
[21:57:37] brendan6: Remote host closed the connection

2017-03-08

[16:58:12] brendan6: has joined #RubyOnRails
[16:58:24] brendan6: Client Quit

2014-12-01

[16:17:22] brendan6: Does anyone know how to fix the "invalid byte sequence" bug that sometimes happens with strings? I have already tried #force_encoding and #encode with the replaces and nothing
[16:24:53] brendan6: smathy: I've read that article and unfortunately it didn't help. I finally did find something that did though which is similar to workmad3's approach which encodes it first to UTF-16 then back to UTF-8
[16:25:18] brendan6: The odd thing is that it has already been converted to UTF-8
[16:27:33] brendan6: https://gist.github.com/HuffMoody/b0488eb669e35c9d207d
[16:27:54] brendan6: workmad3: It's from an S3 stream. It was converted to UTF-8 before it was uploaded
[16:28:27] brendan6: workmad3: I also tried encode('UTF-8', 'UTF-8', :invalid => :replace, :undef => :replace, :replace => "?")
[16:28:53] brendan6: workmad3: Good to know though
[16:31:34] brendan6: workmad3: That's my current approach which basically converts it to UTF-16 then UTF-8
[16:31:45] brendan6: ...which works, just seems expensive
[16:34:11] brendan6: workmad3: Yea that must be the situation. Very strange since it was definitely encoded to UTF-8 first and running it through rchardet guesses UTF-8
[16:35:36] brendan6: Just checked
[16:38:20] brendan6: false ...hmmmm
[16:39:40] brendan6: workmad3: That's a good point. Thanks!
[16:39:51] brendan6: workmad3: I think that might be the situation, I'm going to have to dig into that

2014-11-14

[19:41:05] brendan6: anybody run into the error ActiveRecord::AdapterNotSpecified: 'production' database is not configured. Available: ["development", "test"]?
[19:47:39] brendan6: pipework: My database.yml is not on gitignore and its looks like https://gist.github.com/HuffMoody/906f1c4187d9f8077e6d
[19:50:43] brendan6: pipework: Found the cause, it looks like ELB is overwriting my database.yml ...now to figure out why

2014-10-23

[22:12:07] brendan6: I have a question for the rspec pros out there: Is there a way to combine yield_successive_args with receive? I outlined it in this example https://gist.github.com/HuffMoody/b322070eed4dac32e46b

2014-08-11

[19:45:46] brendan6: Hey, I have a bit of a best practises questions. I have a multi-stage wizard that collects various bits of information and saves after every step. I would like a few things to happen after a user completes a step. It is best to create a separate controller action for each step or is there a better approach?
[20:23:31] brendan6: rhizome: Yea I have a service object that performs a series of steps on update
[20:23:38] brendan6: koyd: Implementing myself
[20:25:44] brendan6: rhizome: Yea I would prefer to not go that route either. I will prepare a gist
[20:43:37] brendan6: rhizome: I have something like this https://gist.github.com/HuffMoody/c82c6dac0f6e54f4ba48. The private function names are just examples but that is the gist
[20:45:01] brendan6: cpruitt: Are you familiar with #first_or_initialize_by ?
[20:55:04] brendan6: cpruitt: Maybe just create a view helper method for that? #meta_data_for(model)

2014-07-16

[16:35:21] brendan6: Does anybody know how to create a json key that has a period in it using Jbuilder?

2014-05-05

[20:56:18] brendan6: I have a situation where a series of ActiveRecord associations need to be built after an object is created. I want to avoid using an after_create callback because I don't want this to happen during testing. I also feel like I should avoid putting it into the controller action. Does anyone have any design pattern suggestions for a situation like this?
[20:58:28] brendan6: joy4u: What about a nested route where the bid is created on the request then use an authorization library like Pundit to determine if a given user is authorized to create a bid for a given request
[21:00:03] brendan6: bricker: jenrzzz: I will look up a service object pattern. There are a bunch of associations that need to be made so its a rather complex scenario
[21:16:02] brendan6: bricker: jenrzzz Yep, this is definitely the right approach. Not to just come up with a name....
[21:18:05] brendan6: joy4u: First you check if the user is authorized to create a bid for a given request, and if so, allow them to create a bid. If they aren't, simply return a 401. No need to create a special error message because this is a situation in which someone is actually trying to hack your system
[21:18:27] brendan6: joy4u: I would recommend Pundit
[21:22:01] brendan6: joy4u: Personal preference, but I like Pundit the best

2014-04-23

[03:44:17] brendan6: I had a general question about code style that I've been struggling with a bit that I was wondering if someone could give some insight towards. Question of what arguments to include in an PORO constructor/methods. Outlined http://pastie.org/9102347
[03:46:11] brendan6: Right. Given that example I feel like I would be most inclined to use Approach 3 because it seems familiar but other examples its hard to determine
[03:46:31] brendan6: Oh ok. So more so Approach 2
[03:47:59] brendan6: I've kind of felt that was the responsibility of a form object.. Take params to update an object with
[03:48:48] brendan6: jrock20041: Also, I would recommend trying RubyMine
[03:49:31] brendan6: No, its not. But I would recommend trying it.
[03:52:49] brendan6: The FormObject example is just an example though. I'm more so concerned about trying to isolate the thought process in deciding what to include in a constructor vs. method
[03:56:51] brendan6: Ok so given I have an object whose role it is to sync data from an external source to a set of relations in a domain object. The object shouldn't exist without the external source or without the domain object it is syncing to?
[04:06:24] brendan6: sevenseacat: I think I might just be overthinking it. The object is small enough in its current state that its more of a just pick one approach and go with it. If it evolved to a point that makes sense to move something things around then so be it. I guess that is the point of refactoring
[04:08:07] brendan6: Per can sometimes refer to an "Agent" as in an acting authority to make a deal for someone else

2014-01-24

[17:28:23] brendan6: antoine: You'll have to create a gist so we can see more
[18:13:38] brendan6: Does anybody know of a way to have accepts_nested_attributes_for use a _type attribute to build the appropriate model? (One base model with many subclasses all stored in an single embedded_in with mongoid)
[18:20:07] brendan6: brain_shim: No, not exactly. There is one Base class that has many descendants. One or more of the decendants will be stored in an embeds_many relationship. However, I need some way of specifying which subclass to build when using accepts_nested_attributes_for
[18:28:26] brendan6: brain_shim: An example of what I'm trying to achieve https://gist.github.com/HuffMoody/8603152
[18:29:02] brendan6: brain_shim: I'm going to look into associates to see if that will solve the problem
[18:44:11] brendan6: brain_shim: The _type field is on the nested attributes so it would be more like params[:animals_attributes][0][:_type]. But I have actually found a solution using include Mongoid::Attributes::Dynamic and allowing the _type parameter to be passed in. Mongoid uses the _type field internally so it knows how to build the appropriate model on read

2014-01-15

[19:48:58] brendan6: I am having trouble sending emails with ActionMailer occasionally getting Net::SMTPAuthenticationError with SMTP and Gmail. I've read that Google could be blocking login to the account because too many are being sent too close together. What I haven't seen is what to do to get around this. Has anyone else every encountered this issue?

2013-12-06

[20:22:19] brendan6: ns on how to proceed?
[20:22:19] brendan6: I'm trying to isolate a performance issue with a worker process I have and I notice the biggest bottleneck is coming from to_json. I am aware of yajl and oj but they only seem to make a marginal difference in the total run time. Running the same script in isolation run in a much more reasonable time (1 second vs 20 seconds). https://gist.github.com/HuffMoody/7831466 is a code sample. Does anyone have any suggestio
[20:27:44] brendan6: latortuga: I
[20:27:56] brendan6: latortuga: I'm running that exact code in my dev environment
[20:28:46] brendan6: latortuga: It starts and completes in about 20 seconds if that's what you're asking
[20:29:12] brendan6: latortuga: commenting out the #to_json and the worker runs in 0.003 seconds
[20:30:57] brendan6: to_s runs in 1.92
[20:34:10] brendan6: latortuga: I actually just tried Yajl::Encoder.encode on that line and its running in 1.112 seconds now, to_json still at 20 seconds
[20:34:45] brendan6: latortuga: so despite the fact they run similarly in an isolated script, to_json is considerably slower in my rails app
[20:38:18] brendan6: latortuga: Hmm, well I seem to be getting somewhere now. I'm going to try and keep poking away to see if I can get my actual script to run in a reasonable amount of time. Thanks a lot for the help!

2013-11-05

[17:56:03] brendan6: Does anybody ever run into the issue where Unicorn *sometimes* doesn't restart with a sig USR2? Most of the time it restarts fine but every now and then I'll do a deploy and notice the process is not restarting (verifying with a ps aux | grep unicorn) and not noticing the (old) show up. Even manually running `sudo service unicorn_application restart` will not restart.
[17:57:51] brendan6: FooBarWidget: I've tried doing a `kill -s USR2 <pid>` and it still wont restart. Only stop+start gets it to pick up code changes
[17:58:42] brendan6: FooBarWidget: Might give passenger a try not that 4x is out, also considering switching to puma
[17:59:49] brendan6: must be sig RAINBOW
[18:00:48] brendan6: toretore: yes, stop + start. Not crazy how I get "Something went wrong" pages though
[18:11:11] brendan6: lethjakman: Try commenting out the line require 'rspec/autorun' at the top of your spec_helper and restart guard
[18:12:04] brendan6: toretore: I think the solution is to use SIGHUP, ignore zero downtime since its buggy and cause a little delay for some users right after deployment
[18:19:45] brendan6: tubbo: Yea I've gone through that before. Problem was with USR2 and zero-downtime not ALWAYS (usually but not always) restarting
[18:21:37] brendan6: tubbo: I've been using USR2 with preload_app true
[18:21:55] brendan6: tubbo: https://gist.github.com/HuffMoody/7323188
[18:27:41] brendan6: lethjakman: http://stackoverflow.com/questions/18391211/whats-rspec-autorun-for Guard doesn't need it because it does that already
[18:30:49] brendan6: khuutantai: which gem?
[18:33:01] brendan6: spygame: pushState simply changes the history, has nothing to do with async javascript execution
[18:33:40] brendan6: spygame: Don't use it, it will make your life easier
[18:33:51] brendan6: spygame: referring to turbolinks

2013-11-01

[22:26:27] brendan6: Does anybody know of a way to remove an association instead of deleting the record for accepts_nested_attributes_for? I've taken this approach https://gist.github.com/HuffMoody/7272960 but getting the error PG::SyntaxError at /en/teams/sample-team ERROR: multiple assignments to same column "team_id"

2013-10-29

[19:20:55] brendan6: Has anybody run into issues with custom sass functions no longer working with rails 4?

2013-10-23

[21:10:13] brendan6: I find myself doing something like articles_path(article, locale: params[:locale]) often. Is there a way to configure the url helpers to always append the locale to the end?
[21:10:22] brendan6: *article_path

2013-10-09

[16:40:06] brendan6: I have a project that I am about to start that is going to be using the same back-end codebase but two different front-end layouts. Any suggestions on how to approach this type of problem?

2013-08-24

[00:11:26] brendan6: hellion: what do you mean less secure? That I believe permits all so if its from an untrusted source, yes, that is unsecure
[00:11:46] brendan6: hellion: You should explicitly outline which parameters you want to permit
[00:12:47] brendan6: joshsmith: No, your assets will compile on deployment. Try not to compile your assets locally and check them into git, this will increase your repository size
[00:14:54] brendan6: hellion: http://theotherzach.com/writes/2013/3/11/rails-4-postgres-array-hstore-and-strong-params-guide-by-someone-that-likes-you
[00:16:28] brendan6: joshsmith: are you given a stack trace when it breaks or is it just timing out? Does compiling locally work?
[00:25:20] brendan6: hellion: consider putting the dynamic hstore values into their own namespace and permitting all of those
[00:25:31] brendan6: joshsmith: what version of rails did the application start out as?
[00:25:52] brendan6: I agree with bricker, I have only noticed it being faster
[00:26:27] brendan6: joshsmith: did you remove the asset group, that is no longer needed in rails 4. Also ensure that you have updated your config files accordingly
[00:26:50] brendan6: joshsmith: are you using compass?
[00:29:45] brendan6: joshsmith: Very odd. I'd chalk it up to Heroku then, wouldn't be the first time something is going oddly over there
[00:30:12] brendan6: joshsmith: Personally, I'd consider Chef + DigitalOcean
[00:32:15] brendan6: You already start off saving $30 /month
[00:41:13] brendan6: sdwrage: request.subdomain

2013-08-23

[23:52:00] brendan6: v8energy: if you are using jquery, $.parseJSON('{\"user\":\"1\",\"room\":\"1\",\"token\":\"ascxsafcasdSADSADsadasfWQ@@fewfewffewf\"}')
[23:53:06] brendan6: v8energy: have you tried using the params hash?
[23:53:36] brendan6: v8energy: yea don't use #to_json on the server, you don't want json, you want a hash I assume?

2013-07-22

[15:47:03] brendan6: I'm curious, when using a nginx + unicorn setup, would send_file tie up the unicorn worker until the request is finished?
[15:51:40] brendan6: kaspergrubbe: Just found this, http://blog.kiskolabs.com/post/637725747/nginx-rails-send-file Thanks elaptics, that is also that approach being used here
[15:52:44] brendan6: DaniG2k: HTTP DELETE maps directory to the controller #destroy method when using resources in your routes
[15:53:14] brendan6: kaspergrubbe: Yes, that is what I was trying to do. For uploads, you can use the nginx upload module to proxy that
[15:53:46] brendan6: kaspergrubbe: I have that setup in my app right now actually, I can dig up the config for you and paste it into a gist if you liek

2013-07-05

[16:41:18] brendan6: I have a gem that I maintain that calls #scoped internally. I am getting deprecation errors on rails 4 suggesting to use #all instead. However, #all will not work the same for rails 3 applications. Does anyone have any suggestions on how to fix these deprecations errors will still maintaining support for Rails 4?
[16:42:48] brendan6: DANtheBEASTman: then force rails 3 users to use a specific version of the gem?
[17:00:45] brendan6: s2013: the letter opener gem may come in handy too
[17:02:37] brendan6: s2013: are you trying to view the outgoing emails in production?

2013-06-19

[22:18:09] brendan6: ryan_turner: if you use accepts_nested_attributes for, yes
[22:18:39] brendan6: ryan_turner: *accepts_nested_attributes_for
[22:27:07] brendan6: ryan_turner: http://compositekeys.rubyforge.org/
[22:27:33] brendan6: ryan_turner: but I would probably recommend using a separate column like you suggest
[22:32:29] brendan6: GreekFreak: no

2013-06-12

[21:57:17] brendan6: Has anyone managed to get `gem 'terminal-notifier-guard'` to work with guard-cucumber?

2013-06-11

[17:45:53] brendan6: kleinerdrache: you can use to_date

2013-06-06

[15:50:49] brendan6: weckl: http://stackoverflow.com/questions/6118779/how-to-change-default-timezone-for-activerecord-in-rails3
[16:03:48] brendan6: weckl: Lol, make sure you set it to your current timezone and then reset your console/server. Then Time.zone.now will get you the correct time
[16:18:11] brendan6: Anyone know of a way to selectively filter certain parameters on a model? Example, if I had an Order with the field number and CreditCard with the field number I would want to filter the credit card number but not the order number (so config.filter_parameters doesn't seem to fit the bill)

2013-06-04

[17:03:08] brendan6: rsl: I could but doesn't the method track_on_activities only get run on compile time?
[17:05:39] brendan6: rsl: Right but that would only happen once correct? As in when classes are cached and not on every instantiation of Statistics::Item
[17:08:03] brendan6: rsl: Never, hard coded
[17:08:16] brendan6: rsl: Trying for a DSL like has_many :articles
[17:12:35] brendan6: rsl: I think I found the answer after some digging. http://bit.ly/WBm54s And you're right, that is the approach I am going to take
[17:13:08] brendan6: rsl: Although Item never gets subclasses, Base will get subclasses multiple times and that will cause issues with @@activities. Thanks!