beingjohnm

Activity Graph

Page 1 of 4 | Next »

2019-06-25

[14:50:37] beingjohnm: Remote host closed the connection
[15:20:11] beingjohnm: has joined #RubyOnRails

2019-05-30

[06:23:33] beingjohnm: Ping timeout: 258 seconds
[06:26:24] beingjohnm: has joined #RubyOnRails

2019-05-16

[22:45:16] beingjohnm: Remote host closed the connection
[23:21:03] beingjohnm: has joined #RubyOnRails

2019-04-22

[21:59:04] beingjohnm: Ping timeout: 246 seconds
[22:01:15] beingjohnm: has joined #RubyOnRails

2019-04-13

[16:50:06] beingjohnm: *.net *.split

2019-04-08

[13:34:24] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in
[13:40:25] beingjohnm: has joined #RubyOnRails

2019-03-31

[12:45:28] beingjohnm: some comments on Hacker News yesterday made me want to give turbolinks a try. Definitely seems to speed up the page loags but can't submit a form without a page load.
[12:46:37] beingjohnm: I can see that there is option to turn off the turbolink loading of pages at the link level but that isn't ideal. Any other ideas?

2019-03-16

[14:21:19] beingjohnm: trying to patch a record and format.html { head :ok } redirects in Rails 5.2 (last step of upgrade from 4.2). I had been using head :no_content but that now triggers a download of an empty file
[14:28:29] beingjohnm: actually, head :ok shouldn't be inside the format.html brackets I think
[14:32:35] beingjohnm: that didn't work. It is still trying to redirect to the record.
[18:51:25] beingjohnm: Shorty6: create the javascript file and include it on that page

2019-03-15

[14:09:10] beingjohnm: running into an issue with bundler 2.0.1 and deploying to elastic beanstalk. bummer.

2019-03-14

[20:05:43] beingjohnm: Remote host closed the connection
[20:09:35] beingjohnm: has joined #RubyOnRails

2019-03-11

[18:24:31] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in
[18:28:04] beingjohnm: has joined #RubyOnRails

2019-03-06

[11:37:59] beingjohnm: moving from rails 4 to rails 5. Do I just junk all of my controller tests?
[11:40:06] beingjohnm: getting no route matches...missing required keys id for: get edit_task_url, params: { id: @task.id }
[12:13:06] beingjohnm: These are minitests
[12:16:39] beingjohnm: tbuehlmann: following a guide on transitioning to rails 5 so using IntegrationTest
[12:19:48] beingjohnm: same error with: get edit_task_path, params: { id: @task.id }
[12:20:50] beingjohnm: elsewhere is sounds like I should be doing: get 'tasks/id/edit/ ubut don't know how to write that
[12:21:50] beingjohnm: tbuehlmann: that worked. Thank you!
[12:23:27] beingjohnm: trying to combine bits from different guides...example code was working for the show test but not for the edit test.
[14:04:23] beingjohnm: guyzmo: I never found a free day or two to check out rspec. Your comment makes me wish I had!
[16:57:21] beingjohnm: guyzmo: at some point I'm going to expand my testing (mostly a ton of model and unit tests) and start going integration testing. I'll probably look closer then.

2019-03-02

[14:48:27] beingjohnm: how do you escape special characters in an email address using mailer. e.g. the from name has paranthesis in it so the from string might be "Test(s) <test@example.com>"
[18:32:31] beingjohnm: ACTION might be upgrading to rails 5 today

2019-03-01

[14:15:24] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in
[14:17:13] beingjohnm: has joined #RubyOnRails

2019-02-26

[09:30:05] beingjohnm: Ping timeout: 245 seconds
[09:36:18] beingjohnm: has joined #RubyOnRails
[11:55:51] beingjohnm: Remote host closed the connection
[17:15:08] beingjohnm: has joined #RubyOnRails

2019-02-22

[02:31:14] beingjohnm: has joined #RubyOnRails

2019-02-21

[23:09:26] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in

2019-02-03

[15:04:04] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[15:07:01] beingjohnm: has joined #RubyOnRails

2019-01-29

[19:23:52] beingjohnm: tests failing today with Time.now + 1.month. Question is do I ignore or rework the code so it passes?
[21:59:14] beingjohnm: havenwood: I think it is failing as it is setting the date for one month from now and then checking the month between dates. Typically that would return one and now I think it is returning zero.

2019-01-27

[00:33:17] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[00:38:02] beingjohnm: has joined #RubyOnRails

2019-01-18

[03:53:12] beingjohnm: weird. I'm positive that the behaviour of my code changed. I use using self.child.each and now it seems as if I need to do self.child.all.each
[03:54:27] beingjohnm: not getting an error but if I do the former then the loop doesn't seem to run
[03:56:40] beingjohnm: the all shouldn't be required right?
[03:57:27] beingjohnm: too tired to even create a gist right now. been banging my head on this for a while. writing tests and maybe there is something in there that is getting me
[03:57:45] beingjohnm: thanks though sevenseacat!
[15:45:50] beingjohnm: figure it out. was a combination issue of how I was writing my tests and data being "preloaded" in the model

2018-12-08

[00:18:32] beingjohnm: Ping timeout: 240 seconds
[00:56:48] beingjohnm: has joined #RubyOnRails

2018-12-03

[18:45:18] beingjohnm: reasking my maybe random question: has anybody setup testing that looks at each view and checks if there are any I18n translations that don't exist?

2018-12-01

[16:33:53] beingjohnm: maybe a random question but has anybody setup testing that looks at each view and checks if there are any I18n translations that don't exist?

2018-10-24

[18:48:53] beingjohnm: *.net *.split

2018-09-17

[19:37:45] beingjohnm: I'd do users first
[19:38:23] beingjohnm: and, if you're starting from scratch, writing tests before writing any methods

2018-09-15

[02:31:21] beingjohnm: I click a button in examples/index.html.erb which creates a new example record. I also want that to render a partial (examples/_edit_form_modal.html.erb) that I pass @example.id to.
[02:32:43] beingjohnm: when using $("body").append("<%= j render partial 'examples/edit_form_modal' %>") it is just appending the string rather than rendering the partial and appedning it
[02:34:16] beingjohnm: it seems that I can perhaps only use the append...render inside of a js.erb file. so, how do I load and execute that js.erb file from jquery?
[02:34:53] beingjohnm: There is something very basic here that is escaping me at the moment
[02:43:40] beingjohnm: maybe it will come to me with a fresh start

2018-08-30

[02:36:43] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[02:40:34] beingjohnm: has joined #RubyOnRails
[20:09:43] beingjohnm: running brakeman on my app and getting the warning about mass assignment (https://brakemanscanner.org/docs/warning_types/mass_assignment/index.html). It is catching because I permit :account_id as a parameter for submission of some of my forms. I can't really think of a work around for that though. e.g. when creating a "transaction" I need to pass the account that the transaction is being created
[20:09:49] beingjohnm: for. Any ideas?
[20:58:54] beingjohnm: tycoon177: good point. I should double check that it is looking up only the accounts the user has access to but I'm pretty sure it is.
[21:04:39] beingjohnm: tycoon177: definitely. I feel like I'm adhering to the framework will and not doing anything crazy but I like the additional data point.

2018-08-21

[16:01:54] beingjohnm: at what number of parameters would you instead pass a hash of parameters?
[16:02:14] beingjohnm: I feel my code getting unruly

2018-08-17

[17:39:06] beingjohnm: Ping timeout: 260 seconds
[17:40:03] beingjohnm: has joined #RubyOnRails

2018-08-16

[15:32:07] beingjohnm: Remote host closed the connection
[16:28:50] beingjohnm: has joined #RubyOnRails

2018-07-20

[00:07:28] beingjohnm: *.net *.split
[00:15:24] beingjohnm: has joined #RubyOnRails

2018-07-14

[12:51:13] beingjohnm: has joined #RubyOnRails
[15:05:26] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[15:07:22] beingjohnm: has joined #RubyOnRails

2018-07-13

[16:40:21] beingjohnm: Remote host closed the connection

2018-06-26

[14:25:52] beingjohnm: Remote host closed the connection
[14:31:46] beingjohnm: has joined #RubyOnRails

2018-06-14

[19:18:54] beingjohnm: seriously why does multiplying by a fraction always return zero like nothing happened
[19:27:26] beingjohnm: t = 0.01 * 100 * (5/9)
[19:28:06] beingjohnm: just researched and see that I have to add .to_f to the numerator and/or denomiantor but that feels like terrible default behaviour
[19:28:15] beingjohnm: should at least output a warning
[19:54:57] beingjohnm: baweaver: I'm not convinced that is expected. Maybe a warning that says "It looks like you are trying to divide two integers and you might expect a float to be returned. We're going to return zero but if you wanted a float you can use this alternative method."
[19:55:40] beingjohnm: I just can't think of a use case otherwise
[19:57:56] beingjohnm: I will cede both of those points but does everybody just multiple every number inside their apps by 100?
[19:59:07] beingjohnm: From a user's point of view I can't think of anytime I would want 5/9 to equal 0.
[22:39:49] beingjohnm: Radar: that sounds like something I should do for my app
[22:47:18] beingjohnm: Just added to my too reesearch list

2018-05-29

[02:46:56] beingjohnm: *.net *.split
[02:47:45] beingjohnm: has joined #RubyOnRails
[02:50:08] beingjohnm: *.net *.split
[02:51:45] beingjohnm: has joined #RubyOnRails
[18:53:00] beingjohnm: *.net *.split
[18:53:38] beingjohnm: has joined #RubyOnRails

2018-05-28

[01:35:50] beingjohnm: Ping timeout: 276 seconds
[01:36:37] beingjohnm: has joined #RubyOnRails

2018-04-25

[12:25:57] beingjohnm: *.net *.split
[12:27:31] beingjohnm: has joined #RubyOnRails
[15:01:28] beingjohnm: *.net *.split
[15:03:07] beingjohnm: has joined #RubyOnRails

2018-04-23

[15:32:08] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[15:34:46] beingjohnm: has joined #RubyOnRails

2018-04-05

[01:21:30] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[01:25:10] beingjohnm: has joined #RubyOnRails
[02:40:12] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[02:51:58] beingjohnm: has joined #RubyOnRails
[02:56:52] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[03:00:47] beingjohnm: has joined #RubyOnRails
[15:34:31] beingjohnm: Been pulling my hair out with something for the past couple of hours: https://gist.github.com/global001/13c241f57a74be0b46f669b76dca409b
[16:10:02] beingjohnm: anybody want to help a brother keep his hair and let me know while this view loop prints out what is inside an if statement regardless? https://gist.github.com/global001/13c241f57a74be0b46f669b76dca409b
[16:50:41] beingjohnm: thomasfedb: no...
[16:52:42] beingjohnm: I did. And it seems to be testing the even/odd correctly based on the debugs. The issue seems to be a quirk of views or something.
[16:53:02] beingjohnm: I feel like I came across this a couple of years ago but can't remember exactly what the issue was.
[16:54:46] beingjohnm: I'll try that
[16:57:33] beingjohnm: that resulted in some strange behaviour. It put all of them on one row (inside of <tr></tr>) with the other four rows appearing empty and outside of the table
[17:06:34] beingjohnm: thomasfedb: this is going to be helpful with debugging. thanks.

2018-04-04

[18:18:05] beingjohnm: Ping timeout: 276 seconds
[18:36:49] beingjohnm: has joined #RubyOnRails
[20:09:12] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[20:18:15] beingjohnm: has joined #RubyOnRails
[21:17:13] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[21:41:29] beingjohnm: has joined #RubyOnRails

2018-03-28

[01:19:27] beingjohnm: Ping timeout: 252 seconds
[01:20:42] beingjohnm: has joined #RubyOnRails

2018-03-15

[02:30:14] beingjohnm: trying to use fontawesome 5 but having trouble with production. When deploying it is adding the "fingerprint" to the end of the font filenames but the fontawesome scss file is not including the fingerprtinted version of the filenames. I tried using asset-url and font-url in the path. Those give me the correct path but don't add the fingerprinted filename.
[02:40:09] beingjohnm: fryguy: I don't think that includes the new pro fonts
[02:58:42] beingjohnm: got it. placing the fonts in public rather than assets solves the problem.

2018-03-14

[16:07:04] beingjohnm: tycoon177: I think that question might be outside the intended scope of the channel :)
[16:08:20] beingjohnm: you could probably send them striaight to s3 and process them with lambda
[16:08:28] beingjohnm: but I don't know how to set that up

2018-03-09

[11:23:09] beingjohnm: dionysus69: I use Papertrail for that
[19:56:33] beingjohnm: prutheus: I'm not positive but I believe if you're trying to link to a stylesheet in an email you'll need it to be in /public/assets. And then I would hardcode the full url with domain name in the email rather than using the stylesheet include tag
[20:09:21] beingjohnm: prutheus: did you try this? https://stackoverflow.com/questions/7801102/how-to-have-absolute-path-for-stylesheets-in-mailer-with-the-asset-pipeline

2018-03-02

[21:16:48] beingjohnm: za1b1tsu: Session.includes(:ratings).where("ratings.subject = 'review'") ?
[21:17:28] beingjohnm: oh never mind

2018-03-01

[15:30:16] beingjohnm: terens: DateTime.strptime("1519916596.0613241", '%s')

2018-02-28

[16:43:38] beingjohnm: has joined #RubyOnRails
[19:00:26] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[20:34:29] beingjohnm: has joined #RubyOnRails

2018-02-23

[07:57:39] beingjohnm: has joined #RubyOnRails
[08:11:48] beingjohnm: *.net *.split
[08:34:18] beingjohnm: has joined #RubyOnRails
[18:44:46] beingjohnm: *.net *.split

2018-02-21

[09:49:47] beingjohnm: Ping timeout: 276 seconds
[09:52:33] beingjohnm: has joined #RubyOnRails

2018-02-20

[15:26:32] beingjohnm: MrCrackPotBuilde: you can use a second controller for a model but you'll need to be the shop creation views in a folder for the second controller. I believe.
[15:27:20] beingjohnm: Can somebody take a quick look at the weird results I'm getting from a where query using "NOT IN": https://gist.github.com/global001/da4227cac903e50d68d183e32aa7a8d6
[15:31:24] beingjohnm: you don't need to create a new model
[15:34:05] beingjohnm: It sounds like you need to remove the new and create methods from your shop controller and put them in a new controller. Move the new.html.erb from your shop controller views to the new controller views.
[15:47:46] beingjohnm: btw, not sure if it matters but I'm on rails 4. But it seems to be a postgres thing.
[16:59:29] beingjohnm: so it appears that you have to add IS NOT NULL to the end of a subquery when using NOT IN with postgres. e.g. User.where("users.id NOT IN (SELECT user_id FROM activities WHERE activities.created_at >= '2017-01-01' AND activities.created_at <= '2017-12-31' AND user_id IS NOT NULL)").count

2018-02-19

[20:36:02] beingjohnm: Inside: use jquery to replace the text on that page?
[20:36:20] beingjohnm: not sure what the question is really
[20:37:51] beingjohnm: Inside: google "jquery to replace text on a page"

2018-02-09

[16:45:58] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[16:50:34] beingjohnm: has joined #RubyOnRails

2018-01-22

[07:20:00] beingjohnm: Ping timeout: 248 seconds
[07:24:14] beingjohnm: has joined #RubyOnRails
[15:15:57] beingjohnm: Ping timeout: 240 seconds
[15:20:22] beingjohnm: has joined #RubyOnRails

2018-01-20

[14:22:53] beingjohnm: Remote host closed the connection
[14:59:38] beingjohnm: has joined #RubyOnRails

2018-01-12

[20:17:08] beingjohnm: is there a way to undo a csv import if an error occurs with one of the rows? Or do I need to test the whole csv file before saving records?
[20:33:57] beingjohnm: fryguy: importing it into the database

2018-01-11

[14:56:42] beingjohnm: I'm looking to implement custom fields (user can create new fields for a model) and it sounds like I can either use a custom fields table or the hstore feature of of postgres. Anybody have any experience with this? My first question is with the custom fields table method. If I want to offer the user the choice of either creating a text or a number field that seems to change the key/value paradigm. I'll need to do key/value_type/value_tex
[14:59:44] beingjohnm: json might work. hadnt considered that. Is it relatively fast with active record?

2017-12-21

[02:07:17] beingjohnm: *.net *.split
[02:08:35] beingjohnm: has joined #RubyOnRails

2017-12-13

[14:28:13] beingjohnm: fschuindt: the Chrome extension Postman?

2017-11-17

[20:56:26] beingjohnm: anybody having issues with workers/database connections with Heroku right now?

2017-11-14

[15:52:34] beingjohnm: Remote host closed the connection
[15:59:50] beingjohnm: has joined #RubyOnRails

2017-11-09

[06:15:04] beingjohnm: Ping timeout: 248 seconds
[06:17:29] beingjohnm: has joined #RubyOnRails

2017-11-06

[06:31:52] beingjohnm: *.net *.split
[07:11:58] beingjohnm: has joined #RubyOnRails

2017-09-27

[17:01:36] beingjohnm: Remote host closed the connection
[17:08:07] beingjohnm: has joined #RubyOnRails

2017-07-28

[13:38:28] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[16:29:39] beingjohnm: has joined #RubyOnRails

2017-07-14

[01:49:37] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[01:50:42] beingjohnm: has joined #RubyOnRails

2017-07-12

[13:18:53] beingjohnm: has joined #RubyOnRails

2017-07-11

[16:48:13] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in

2017-06-29

[14:30:06] beingjohnm: Remote host closed the connection
[14:48:14] beingjohnm: has joined #RubyOnRails

2017-06-27

[17:12:56] beingjohnm: arup_r: to save disk space?
[17:13:25] beingjohnm: When you do what is outlined on that page I believe it only returns anything that has not been completed
[17:14:14] beingjohnm: Can you connect ot Redis directly?
[17:14:58] beingjohnm: I meant outside of Sidekiq
[17:15:21] beingjohnm: yeah, I saw that too
[19:13:45] beingjohnm: Anybody know how to merge two I18n yml files inside of rails? I have my default en file and then client specific yml files that replace certain strings in the en.yml.

2017-06-16

[23:26:15] beingjohnm: *.net *.split

2017-06-14

[19:09:49] beingjohnm: I'm providing a whitelabel version of my software to a client so I'm going to end up with two different production environments. How will I handle that in regards to the databases? Add another production db to database.yml and use environmental variables to pick which?
[19:17:41] beingjohnm: looks like I copy environments/production.rb to production-x.rb and then add a production-x.rb section to database.yml
[19:18:45] beingjohnm: arup_r: they will not be. the client wants it on their own heroku account
[19:23:57] beingjohnm: arup_r: won't that be a pain every time I deploy my commits?
[19:25:39] beingjohnm: hmmm...I could see that happening
[19:27:09] beingjohnm: I imagine this is the only client that will get the whitelabeled on their own servers
[19:27:35] beingjohnm: just trying to get it up and running asap so I can transfer data and then get back to work building features

2017-05-30

[15:34:40] beingjohnm: Ping timeout: 260 seconds
[18:40:47] beingjohnm: has joined #RubyOnRails

2017-05-14

[10:53:12] beingjohnm: I'm using minitest and in one of my controller tests I create @user in setup. The form in that controller accesses the @user instance variable for a select field but I keep getting na error about it being nil.
[13:14:01] beingjohnm: tbuehlmann: Any suggestions on how to run the test?
[13:23:13] beingjohnm: tbuehlmann: https://gist.github.com/global001/a69e32ff6166c71d02784a0ade75cee7
[13:23:29] beingjohnm: line 20 in the form is the line causing the issue
[13:27:18] beingjohnm: tbuehlmann: done. thanks.
[13:32:08] beingjohnm: good question. It looks like it might not be. I thought it was being set by devise but I'm not seeing that to be the case.
[13:34:36] beingjohnm: I know devise is creating current_user but I use @user in the registrations controller successfully
[13:36:07] beingjohnm: which would be because the registration for is a form for @user
[13:38:27] beingjohnm: in theory this form could be accessed by the current_user or by an admin on the user's behalf. That is why I have that active record association the way it is.
[13:39:23] beingjohnm: would an instance variable in the setup be available in the controller?
[13:42:22] beingjohnm: so, how does one handle a view that contains an active record association in a test?
[13:44:19] beingjohnm: I am going to add that to the controller
[13:44:40] beingjohnm: and then pass it as a local in new.html.erb to the form partial
[13:51:20] beingjohnm: gist updated to reflect that
[13:51:26] beingjohnm: and test passes now
[13:51:45] beingjohnm: thanks tbuehlmann!
[16:10:24] beingjohnm: durango: could be a browser plugin possibly
[21:43:18] beingjohnm: Ping timeout: 268 seconds
[21:44:06] beingjohnm: has joined #RubyOnRails

2017-05-11

[20:26:50] beingjohnm: I'm using sidekiq on heroku. Does each sidekiq queue need its own worker dyno?

2017-05-05

[04:11:53] beingjohnm: I am having a brain fart. This form "<%= bootstrap_form_for @activity, :url => {:action => "associate_with_user"} do |f| %>" when submitted is producing Parameters: {"utf8"=>"✓", "authenticity_token"=>"7G2WRZQ31i3j784KbkVC3zDsOM80ORWhxjoA5cn4S23uTUjZXhQrhlLDenU2AHCSnXa/spav04y3KseCptpbFw==", "activity"=>{"user_id"=>"495b6916-40b3-4b06-a1cf-67514d18e32d"}, "commit"=>"Save changes", "id"=>"associate_with_user"}
[04:12:25] beingjohnm: why is the id that is being passed the name of the custom action?
[04:51:04] beingjohnm: I gave up. Just added a hidden field to the form and modified the update action in the cotnroller. I think the issue was with creating the form with the custom action in model A but the form was for model B. Routing issue. Too tired to think about it any more. Bed time.

2017-05-02

[14:45:09] beingjohnm: Ping timeout: 240 seconds
[14:54:42] beingjohnm: has joined #RubyOnRails

2017-04-27

[00:10:21] beingjohnm: has joined #RubyOnRails

2017-04-26

[23:58:20] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in

2017-04-25

[20:44:40] beingjohnm: Definitely not looking to upgrade to rails 5 any time soon.
[20:45:01] beingjohnm: I'm now old enough that I never want to upgrade anything if it works. :)
[20:46:38] beingjohnm: the key being "if it works"
[20:47:50] beingjohnm: I used to upgrade Ubuntu or my Mac the day a new OS version was released. Or moving from Bootstrap 1 to 2. Inevitably there would be problems so now I schedule time for those types of things as too mnay responsobilities to deal with broken systems
[20:51:16] beingjohnm: previously I would have taken that info about rails 5 and used that as my solution but not taken into account all of the effort of migrating the rest of the code base
[20:52:20] beingjohnm: I think deliverables and deadlines increasing with age is the real root of my upgrade paranioa
[21:55:50] beingjohnm: mikecmpbll: got it working my moving the wicked_pdf generation to a model and passing data as locals to render_to_string
[21:59:50] beingjohnm: I did do the current_user workaround and moved the helper methods (only about 20) as well