tfitts

Activity Graph

Page 1 of 11 | Next »

2019-03-23

[01:18:56] tfitts: Quit: Connection closed for inactivity

2019-03-22

[22:59:17] tfitts: has joined #RubyOnRails
[22:59:23] tfitts: has joined #ruby

2019-02-09

[02:34:36] tfitts: Quit: Connection closed for inactivity

2019-02-04

[23:25:04] tfitts: has joined #RubyOnRails
[23:25:10] tfitts: has joined #ruby

2019-01-27

[05:14:45] tfitts: has joined #RubyOnRails
[05:14:51] tfitts: has joined #ruby
[07:24:27] tfitts: Quit: Connection closed for inactivity

2019-01-23

[01:30:22] tfitts: Quit: Connection closed for inactivity

2019-01-22

[21:20:50] tfitts: has joined #ruby
[21:21:06] tfitts: has joined #RubyOnRails
[21:24:17] tfitts: I'm wondering if anyone knows when using ActiveModelSerializers if there is a way to have a has many relationship return nil or even not have the key in the json response instead of having an empty array

2019-01-12

[03:36:00] tfitts: has joined #ruby
[07:15:27] tfitts: Quit: Connection closed for inactivity

2018-12-26

[21:21:52] tfitts: has joined #ruby
[23:31:27] tfitts: Quit: Connection closed for inactivity

2018-12-13

[04:30:20] tfitts: has joined #ruby
[07:08:38] tfitts: Quit: Connection closed for inactivity

2018-10-25

[19:09:09] tfitts: has joined #ruby
[19:09:45] tfitts: is there a method that is similar to map but for a single object? I normally want this in the console when I'm looking at objects a few levels deep and want to pull out a few pieces of data from that
[19:14:05] tfitts: po has many pois (alias for purchase_order_items), pois belongs to item, po.pois.item.the_method_here{|x| [x.id, x.sku, x.quantity}
[19:14:27] tfitts: I realize I can do po.pois.map{|x| [x.item.id, x.item.sku, x.item.quantity]}
[19:15:25] tfitts: but on occasion there are 2 or 3 levels deeper than pois, sometimes several words long. I'm mainly looking for it as a convenience but I would think it exists
[19:16:20] tfitts: TheNet: yeah, that's more or less what I currently do
[19:16:51] tfitts: it looks like instance_eval does what I want though
[19:19:51] tfitts: ugh, still on 2.42. I'll have to see if there's any reason to not upgrade.

2018-08-21

[20:19:28] tfitts: *.net *.split

2018-08-17

[04:40:15] tfitts: has joined #RubyOnRails
[04:40:15] tfitts: has joined #ruby

2018-08-15

[13:16:54] tfitts: Quit: Connection closed for inactivity

2018-08-09

[04:27:34] tfitts: Anyone here using the fastjson_api gem from netflix? I'm wondering if there's a way to probably set the model type for records that use single table inheritance? ActiveModelSerializer did it automatically but I don't see anything about it for fastjson_api

2018-08-01

[17:59:56] tfitts: Ping timeout: 256 seconds
[18:02:56] tfitts: has joined #RubyOnRails
[18:02:56] tfitts: has joined #ruby

2018-07-27

[18:27:16] tfitts: has joined #RubyOnRails
[18:27:16] tfitts: has joined #ruby

2018-06-29

[04:54:55] tfitts: Quit: Connection closed for inactivity

2018-06-26

[22:25:26] tfitts: has joined #RubyOnRails
[22:25:26] tfitts: has joined #ruby

2018-06-06

[18:44:54] tfitts: Quit: Connection closed for inactivity

2018-05-30

[04:37:37] tfitts: has joined #RubyOnRails
[04:37:37] tfitts: has joined #ruby

2018-05-25

[22:06:52] tfitts: Quit: Connection closed for inactivity

2018-05-17

[22:24:41] tfitts: I'm trying to pass in a global id to an active job, but even if I convert the gid to a string I still see in the log that it's passing the GID object
[23:10:05] tfitts: morning radar
[23:15:42] tfitts: I don't really have anyone else to bounce this question off, wondering if you have any ideas. I'm trying to figure out a way to let people subscribe to alerts for different actions on different models with different formats (e.g. email, sms). I'm trying to figure out how to manage how to generate the proper message based on model, contact, event, format and send it on. I think the subscription part is pretty easy,
[23:16:26] tfitts: but trying to figure out which info should be passed into what model/class to get the right message without it getting ugly and and messy to maintain

2018-05-11

[18:17:16] tfitts: has joined #ruby
[18:17:17] tfitts: has joined #RubyOnRails

2018-05-10

[02:02:05] tfitts: Quit: Connection closed for inactivity

2018-05-09

[23:02:38] tfitts: has joined #RubyOnRails
[23:02:38] tfitts: has joined #ruby

2018-05-07

[19:54:03] tfitts: has joined #RubyOnRails
[19:54:03] tfitts: has joined #ruby
[20:53:21] tfitts: *.net *.split
[23:08:17] tfitts: Quit: Connection closed for inactivity

2018-05-04

[02:18:04] tfitts: Quit: Connection closed for inactivity

2018-05-03

[21:08:30] tfitts: has joined #RubyOnRails
[21:08:30] tfitts: has joined #ruby

2018-05-02

[01:07:17] tfitts: Quit: Connection closed for inactivity

2018-05-01

[22:57:43] tfitts: has joined #RubyOnRails
[22:57:43] tfitts: has joined #ruby

2018-04-28

[04:54:54] tfitts: has joined #RubyOnRails
[04:54:54] tfitts: has joined #ruby
[08:24:24] tfitts: Quit: Connection closed for inactivity

2018-04-27

[02:09:04] tfitts: Quit: Connection closed for inactivity

2018-04-25

[12:25:37] tfitts: *.net *.split
[12:27:10] tfitts: has joined #ruby
[12:27:31] tfitts: has joined #RubyOnRails
[15:01:08] tfitts: *.net *.split
[15:03:07] tfitts: has joined #RubyOnRails
[15:03:26] tfitts: has joined #ruby

2018-04-24

[12:19:20] tfitts: has joined #ruby
[12:19:22] tfitts: has joined #RubyOnRails

2018-04-05

[08:10:34] tfitts: Read error: Connection reset by peer
[08:10:51] tfitts: has joined #RubyOnRails
[08:10:51] tfitts: has joined #ruby

2018-03-25

[03:32:50] tfitts: has joined #RubyOnRails
[03:32:50] tfitts: has joined #ruby

2018-03-21

[04:06:54] tfitts: Quit: Connection closed for inactivity

2018-03-02

[04:29:19] tfitts: has joined #ruby
[04:29:20] tfitts: has joined #RubyOnRails

2018-02-28

[23:24:12] tfitts: Ping timeout: 265 seconds
[23:25:32] tfitts: has joined #ruby
[23:25:34] tfitts: has joined #RubyOnRails
[23:25:44] tfitts: Max SendQ exceeded
[23:26:07] tfitts: has joined #ruby
[23:26:09] tfitts: has joined #RubyOnRails
[23:26:18] tfitts: Max SendQ exceeded
[23:26:45] tfitts: has joined #ruby
[23:26:47] tfitts: has joined #RubyOnRails
[23:26:58] tfitts: Max SendQ exceeded
[23:27:17] tfitts: has joined #ruby
[23:27:19] tfitts: has joined #RubyOnRails
[23:27:53] tfitts: Max SendQ exceeded
[23:28:17] tfitts: has joined #RubyOnRails
[23:28:17] tfitts: has joined #ruby
[23:28:47] tfitts: Max SendQ exceeded
[23:29:08] tfitts: has joined #RubyOnRails
[23:29:08] tfitts: has joined #ruby

2018-02-26

[17:36:09] tfitts: is it possible to alias an entire controller?
[17:38:50] tfitts: maybe alias all controller routes. I have a model that I subclass, so basically I have Pet and can post to /pets but I'd like if I could also post to /dogs and /cats and also get from those routes.

2018-02-23

[21:37:27] tfitts: has joined #ruby
[21:37:29] tfitts: has joined #RubyOnRails
[21:39:32] tfitts: is there a way to alias an entire controller, such that if I have a Pet model that I access through /pets I can also post to /dogs /cats /birds or get at the same routes

2018-02-20

[21:55:47] tfitts: Quit: Connection closed for inactivity

2018-02-10

[00:25:10] tfitts: has joined #ruby
[00:25:12] tfitts: has joined #RubyOnRails
[00:30:15] tfitts: I have a ruby method I basically want to run constantly, waiting maybe 20 seconds between each run, while also having it auto-restart if it stops running I also need a notification if there's an error but I can do that part easily. Anyone know a gem or just a pattern I should be looking at?

2018-01-19

[01:14:26] tfitts: Quit: Connection closed for inactivity

2018-01-18

[20:04:49] tfitts: has joined #ruby
[20:04:51] tfitts: has joined #RubyOnRails

2018-01-10

[03:41:22] tfitts: Quit: Connection closed for inactivity

2018-01-09

[20:32:00] tfitts: has joined #ruby
[20:32:02] tfitts: has joined #RubyOnRails

2018-01-04

[07:51:44] tfitts: has joined #ruby
[07:51:46] tfitts: has joined #RubyOnRails
[07:55:15] tfitts: I'm trying to use modules for namespacing and inherit from a class. I have module Marketplace, under Marketplace I have module Feed and in Feed I have class Base and class Product. I'm trying to make Product < Base so that it inherits the Base class methods. Do I need to change Base from a class to a module and include Base in each type of feed or is there a way to inherit Base as a class?
[08:15:26] tfitts: It seems like it's working now, but I don't know what changed. (the worst kind of fix) Basically simple class inheritance within a sub-module wasn't working like I expected and now it is.
[08:16:18] tfitts: right, but it was a module within a module
[08:16:24] tfitts: namespaced that way
[11:31:17] tfitts: Quit: Connection closed for inactivity

2017-12-29

[04:05:16] tfitts: Quit: Connection closed for inactivity

2017-12-27

[19:13:30] tfitts: Ping timeout: 255 seconds
[21:27:26] tfitts: has joined #ruby
[21:27:28] tfitts: has joined #RubyOnRails

2017-12-20

[00:19:04] tfitts: no problem
[00:44:20] tfitts: I'm wondering if anyone has done STI without a type column? I'd like to just use some data from the model as they did here https://www.salsify.com/blog/engineering/bye-bye-sti-hello-discriminable-model but things have changed since then.
[22:53:08] tfitts: functionality. I'm wondering if I can make it so called ReportList.new.each(&:do_something) can call do something on each of the reports, and also so ReportList.new.first will give me the first Report
[22:53:08] tfitts: I'm wondering if there's a way to have a class that accepts enumerable methods and calls them on a one of the class methods? Right now I have a report_list that is just an array of hashes. I'm trying to convert it to a ReportList class that lets me reload the report and do a few other things. The report list has an array of what are now Report classes that are similar to the hashes but also have a bit more
[23:03:01] tfitts: ok, I'll check into that.

2017-12-19

[23:44:13] tfitts: belongs to should be fine and that should work.
[23:44:50] tfitts: does cp_code have_many monthly_charges?
[23:45:02] tfitts: not sure if it matters for the direction your going though.
[23:48:17] tfitts: is that not working? what error are you getting?
[23:50:14] tfitts: do you have a method that overrides cp_code or something?
[23:50:49] tfitts: does CpCode.find(31) work?
[23:51:01] tfitts: is it cp_codes_id or cp_code_id?
[23:57:42] tfitts: amperry: definitely should be singular
[23:58:22] tfitts: you can override cp_code and have it do def cp_code CpCode.find_by_id(cp_codes_id) end
[23:58:37] tfitts: but that won't give you eager loading and joins as a correctly named column would.
[23:58:52] tfitts: I think you can also setup a different foreign key on the CpCode model if you need to
[23:58:56] tfitts: not sure if this is an existing or new app.
[23:59:01] tfitts: if it's new just rename the column.

2017-12-11

[22:16:03] tfitts: has joined #ruby
[22:16:05] tfitts: has joined #RubyOnRails
[22:17:20] tfitts: does anyone know of a gem that can convert a pdf (preferrably as a string or StringIO and convert it to postscript) RGhost seems like it can create one and render it to postscript but I'm not having much luck with one created in a separate process

2017-11-30

[02:04:36] tfitts: Quit: Connection closed for inactivity

2017-11-16

[22:36:28] tfitts: I have need to allow complex queries across several models/relationships. I'm wondering if there is a good pattern to follow so I don't have 50 lines of setting up query code in my controller.
[23:27:22] tfitts: ok, I haven't written it in this app yet because I'm trying to prevent it. I'll see if I can grab some from a similar app I've worked on.
[23:31:08] tfitts: https://gist.github.com/tfitts/08f37765fc8735410dfab24701e76651
[23:34:36] tfitts: alright, I'll look into using more scopes.

2017-11-03

[03:45:58] tfitts: include a parameter in link that your server can track
[03:50:38] tfitts: ideally you would. that would be the most unique and secure. If the action doesn't need to be secure you could do something like base64 encode their email as the id. The issue with that would be anyone could encode any email address and make it look like another user clicked the link. Depends on your use case. Storing a record with a unique id is probably for the best though.
[03:51:18] tfitts: I'm sure there's a name for it but I don't know it.
[03:52:04] tfitts: in that model you could also include information like their ip, the time they clicked it, etc.
[03:52:47] tfitts: that would also allow you to expire the links if you wanted. there's way more flexibility with that.
[03:54:14] tfitts: anyone here have a rails 5 api app running that can give me some pointers on testing.
[05:01:41] tfitts: radar: I guess I was just trying to figure out what actually needs to be tested compared to a regular rails app. It seems like request specs and unit tests should mostly cover it. Does that seem right to you?
[05:02:29] tfitts: yebo: I realize this doesn't answer the question you're asking but I think the Website1 and Website2 classes are the bigger problem here.
[05:25:02] tfitts: is it online?
[05:25:53] tfitts: what does to the standards mean, though?
[05:30:14] tfitts: I'll check it out

2017-11-02

[20:33:30] tfitts: anyone here use pghero version 2? I just installed it and I'm trying to get suggested indexes but it raises NotEnabled, "Suggested indexes not enabled"
[21:16:42] tfitts: are other scheduled tasks working?
[21:18:09] tfitts: my cron file needs PATH defined with all my ruby paths in order to run. Otherwise the job itself will execute but it will throw an error.
[21:18:51] tfitts: I've setup scheduled tasks with cron in 3 or 4 different environments lately and they've all needed this. Are you using rbenv or anything?
[21:19:52] tfitts: you can add >> /home/user/app/log/cron.log 2>&1 to the end of your job and it should send the output there.
[21:20:33] tfitts: if not I think it goes to your local mail maybe
[21:20:46] tfitts: it's been a while since I had to debug cron jobs not running right
[21:21:36] tfitts: if you're going to have other jobs you might look at gems like clockwork or whenever. I've been using whever for a long time. You just add 3 config lines to the top of your schedule.rb file and it automatically adds the config so it'll run right and log where you set.
[21:22:15] tfitts: plus it lets you bundle your cron jobs as part of your app, which I like.
[21:24:29] tfitts: your PATH would be an environment setting.
[21:42:05] tfitts: good afternoon!

2017-10-12

[03:30:24] tfitts: 6.68999..6.69).pluck(:retail) they all equal 6.69 and not like 6.689999999. What would cause that. I find it especially weird that the raw SQL statement returns the right number.
[03:30:24] tfitts: I have kind of a weird issue I've never really seen before. Using postgres I have a model called Item with an attribute called retail which is a decimal. If I do Item.where(retail: 6.69).size I get 0, if I do Item.where(retail: 6.68999..6.69).size I get 279. if I to Item.connection.execute("select count(id) from items where retail = 6.69") I get [{"count"=>279}], and if I do Item.where(retail:
[03:36:35] tfitts: Also, Item.where("retail = ?",6.69).size gives 279
[04:09:03] tfitts: Item.where(retail: 6.69.to_s).size = 279
[04:44:48] tfitts: I guess the other couple of apps I work in are rails 4.2.x and they don't do that

2017-10-04

[23:24:51] tfitts: has joined #ruby
[23:24:53] tfitts: has joined #RubyOnRails

2017-10-02

[00:18:08] tfitts: Quit: Connection closed for inactivity

2017-10-01

[21:58:28] tfitts: has joined #ruby
[21:58:30] tfitts: has joined #RubyOnRails

2017-09-28

[21:24:33] tfitts: Quit: Connection closed for inactivity

2017-09-21

[21:46:33] tfitts: Ping timeout: 252 seconds
[23:45:43] tfitts: has joined #ruby
[23:45:45] tfitts: has joined #RubyOnRails

2017-09-14

[21:24:53] tfitts: has joined #ruby
[21:24:55] tfitts: has joined #RubyOnRails

2017-09-08

[02:19:18] tfitts: Quit: Connection closed for inactivity

2017-09-05

[23:19:52] tfitts: has joined #ruby
[23:19:54] tfitts: has joined #RubyOnRails
[23:20:32] tfitts: Is it possible to broadcast data from a console to a websocket channel in development mode? Does it require redis to be installed?

2017-08-26

[02:32:41] tfitts: Quit: Connection closed for inactivity

2017-08-10

[18:14:42] tfitts: this might just be general ruby but I'm wondering if there is a way to reduce an array to a count of consecutive elements such that [0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0] gives somethings like [{0 => 3},{1 => 6},{0 => 6},{1 => 9},{0 => 3}]
[18:15:28] tfitts: or am I best to just iterate through the array and add as I go

2017-08-03

[05:25:02] tfitts: Ping timeout: 255 seconds
[07:24:09] tfitts: has joined #ruby
[07:24:11] tfitts: has joined #RubyOnRails

2017-07-27

[03:14:00] tfitts: has joined #ruby
[03:14:01] tfitts: has joined #RubyOnRails

2017-07-18

[03:20:40] tfitts: Quit: Connection closed for inactivity

2017-06-29

[00:06:34] tfitts: has joined #ruby
[00:06:36] tfitts: has joined #RubyOnRails

2017-06-28

[04:44:41] tfitts: Quit: Connection closed for inactivity

2017-06-27

[16:40:08] tfitts: has joined #ruby
[16:40:10] tfitts: has joined #RubyOnRails

2017-06-13

[07:27:56] tfitts: Quit: Connection closed for inactivity

2017-06-02

[16:00:35] tfitts: attributes for the model now.
[16:00:35] tfitts: I have kind of a weird one. I just changed ruby versions so I'm not sure if it's related to that but I'm in pry and I have a User model and a Timeclock model. when I do Timeclock.last I get #<Timeclock id: 29750, user_id: 3, in_at: "2017-06-02 15:31:50", out_at: nil, created_at: "2017-06-02 15:31:50", updated_at: "2017-06-02 15:31:50"> but if I do User.last I just get #<User:0x3fdadc7c83e0> It doesn't show any
[16:02:17] tfitts: I also upgraded devise, I guess it could possibly be related to that.
[16:03:18] tfitts: ah, it's devise

2017-06-01

[23:24:42] tfitts: Anyone here use the google adwords api gem? I'm not able to install it because of a savon dependency conflict. The issue is here https://github.com/googleads/google-api-ads-ruby/issues/15 and the last comment says "The newest versions of ads_common and adwords_api no longer have a dependency on Savon" but when I try installing the gem I still get the conflict.
[23:33:33] tfitts: changing which version?

2017-05-31

[09:01:06] tfitts: *.net *.split
[10:51:22] tfitts: has joined #ruby
[10:51:24] tfitts: has joined #RubyOnRails

2017-05-26

[04:55:30] tfitts: Anyone know of a rails 5 compatible alternative to draper? I'm using api mode but I still need to generate some PDFs and don't want all that code in my models.
[04:56:59] tfitts: oh, I was reading a bunch of stuff that it wasn't and I get some errors when I tried it.
[04:58:20] tfitts: Draper::UninferrableDecoratorError: Could not infer a decorator for ActiveRecord::Base
[05:00:21] tfitts: this is a new-ish app that started on version 5. I just have previously used draper in a rails 4 project and thought it would work fine for this pdf stuff. I saw some other recommendations about a gem called cells but that one seemed more for generating views, though I suppose it may be able to do both.
[05:00:57] tfitts: is app/decorators/* not loaded be default in rails 5? if I do OrderDecorator.new I get NameError: uninitialized constant OrderDecorator
[05:01:57] tfitts: that's what I thought, but I'm looking at the OrderDecorator class which is defined in app/decorators/order_decorator.rb
[05:02:11] tfitts: OrderDecorator inherits from Draper::Decorator
[05:02:23] tfitts: ah, maybe not spring
[05:03:12] tfitts: I've never manually restarted spring before, just my console
[05:04:44] tfitts: that was it, thanks.
[19:39:30] tfitts: anyone use Bourbon Neat or know how to inspect elements in scss? My breakpoints aren't changing the number of columns and I'm trying to figure out why.

2017-05-19

[03:48:13] tfitts: has joined #ruby
[03:48:15] tfitts: has joined #RubyOnRails

2017-05-13

[01:37:49] tfitts: Quit: Connection closed for inactivity

2017-05-09

[02:58:06] tfitts: has joined #ruby
[02:58:08] tfitts: has joined #RubyOnRails
[02:59:02] tfitts: Anyone here use the Knock gem for JWT and have automatic refresh or sliding sessions? I've read through the issue in https://github.com/nsarno/knock/issues/65 but I'm not sure if I'm supposed to have a specific route for that or if I should have the refresh in my application controller.

2017-05-04

[20:01:53] tfitts: Quit: Connection closed for inactivity

2017-04-30

[12:29:03] tfitts: Remote host closed the connection
[12:52:43] tfitts: has joined #ruby
[12:52:45] tfitts: has joined #RubyOnRails

2017-04-26

[16:29:07] tfitts: has joined #ruby
[16:29:09] tfitts: has joined #RubyOnRails
[16:31:38] tfitts: I'm making a rails 5 api app. I'm wondering if there is a standard or recommended way to protect certain model fields or attributes from being included included in the serialized payload based on user permissions and also preventing changes to fields based on permissions as well

2017-04-07

[20:00:28] tfitts: Quit: Connection closed for inactivity

2017-04-04

[05:14:21] tfitts: *.net *.split

2017-03-31

[22:34:11] tfitts: has joined #ruby
[22:34:13] tfitts: has joined #RubyOnRails