JasonO

Activity Graph

Page 1 of 1

2019-08-22

[00:56:09] JasonO: *.net *.split
[01:13:42] JasonO: has joined #ruby

2019-07-12

[13:00:15] JasonO: Excess Flood
[13:02:39] JasonO: has joined #ruby

2019-05-21

[18:29:10] JasonO: Excess Flood
[18:32:46] JasonO: has joined #ruby

2019-03-18

[06:41:33] JasonO: Excess Flood
[06:46:00] JasonO: has joined #ruby

2019-03-13

[19:04:32] JasonO: Excess Flood
[19:08:29] JasonO: has joined #ruby

2019-03-04

[16:58:26] JasonO: Excess Flood
[17:03:08] JasonO: has joined #ruby

2019-02-04

[17:54:06] JasonO: hi, I've a rails app I am working on. However, when I update a post instead of displaying the update the page is blank and that post no longer appears on the homepage (which contains all posts)
[17:54:20] JasonO: I am unsure what the issue is as the logic is accurate
[17:57:06] JasonO: havenwood: it exists when I check the console
[17:57:43] JasonO: havenwood: here is the code https://dpaste.de/dBK6/raw
[18:00:20] JasonO: havenwood: nil for others except for the 1 post I've not touched
[18:01:33] JasonO: havenwood: yes
[18:01:59] JasonO: havenwood: okay I'll use strong params
[18:18:21] JasonO: havenwood: it worked but I am trying to find out why b/c should not the other method have worked also?

2019-01-12

[22:01:29] JasonO: Excess Flood
[22:04:56] JasonO: has joined #ruby

2019-01-08

[21:46:23] JasonO: Excess Flood
[21:50:35] JasonO: has joined #ruby

2018-11-20

[16:51:18] JasonO: Hello, I am receiving the error "SystemStackError: stack level too deep" when calling on a method
[16:58:25] JasonO: phaul: sure
[17:02:18] JasonO: phaul: trying to find a place. any suggestions?
[17:03:30] JasonO: I'll go with dpaste.de as I don't need an account
[17:07:27] JasonO: phaul: https://dpaste.de/WTef#L7
[17:11:45] JasonO: phaul: https://dpaste.de/ykwu
[17:22:37] JasonO: phaul: so I should only list one has_many association? I've this for comments as well in the same Class. I am trying to provide the user access. Per the association docs https://guides.rubyonrails.org/images/has_many_through.png
[17:22:57] JasonO: .comments to see comments from the user
[17:24:28] JasonO: *user.first.comments
[17:28:10] JasonO: phaul: I realized my mistake after reading your last response
[17:28:17] JasonO: phaul: I removed " # has_many :pictures, through: :comments
[17:28:25] JasonO: now it works. thanks!

2018-11-09

[16:48:48] JasonO: Ping timeout: 245 seconds
[16:57:02] JasonO: has joined #ruby

2018-11-05

[18:48:37] JasonO: why is it okay to use to_s method to print out a class when .to_s is already a Ruby method? Shouldn't this kind of thing be avoided? Would it not be similar to creating a method called puts? def puts, print etc.?
[18:54:46] JasonO: orbyt_: I see. That's interesting. So convention is to always name this method to_s? I could never use inspect for the method name?
[18:55:31] JasonO: is inspect not simply used for debugging? and .to_s the preferred or accepted method? O_o
[19:06:43] JasonO: orbyt_: I read an accepted response on StackOverflow that stated inspect is for debugging and to_s is the acceptable method
[19:16:07] JasonO: orbyt_: thanks!

2018-10-21

[19:20:18] JasonO: how can I change a value using find_by
[19:20:30] JasonO: for example: Recipient.find_by(name: "Frankie").available
[19:20:59] JasonO: which will return the value.. how can I set the value to something else like Recipient.find_by(name: "Frankie").available = true
[19:27:21] JasonO: phaul: yeah it is
[19:27:52] JasonO: was actually just looking at this:
[19:28:05] JasonO: test = Recipient.where(:name => 'Frankie')
[19:28:07] JasonO: test.update_all(:available => true)
[19:28:28] JasonO: currently I've: Recipient.find_by(name: recipient)
[19:29:09] JasonO: how would I save it if I did Recipient.find_by(name: "Frankie").available=true
[19:29:36] JasonO: havenwood: not at all
[19:31:41] JasonO: havenwood: that worked, thanks!
[19:31:58] JasonO: I used multiple lines though

2018-10-20

[02:29:53] JasonO: hello, I am trying to seed some data using rake. however, I receive the following error:
[02:30:06] JasonO: rake aborted!
[02:30:09] JasonO: NameError: uninitialized constant DeliveryPerson
[02:30:10] JasonO: db/seeds.rb:2:in `<top (required)>'
[02:30:40] JasonO: my models are accurate as well. any help would be appreciated
[02:43:11] JasonO: anyone here?
[02:43:25] JasonO: I am trying to seed some data using rake. however, I receive the following error:
[02:43:28] JasonO: db/seeds.rb:2:in `<top (required)>'
[02:43:30] JasonO: my models are accurate as well. any help would be appreciated
[03:32:29] JasonO: figured it out
[11:26:00] JasonO: hello, I am creating am method to assign a random number to a value when iterating. however, I want to break out of the loop then resume to ensure all elements have different values. how can i do this?
[11:26:58] JasonO: break didn't help
[11:35:48] JasonO: apeiros_ phaul something like this https://repl.it/repls/YouthfulGreenyellowCharactermapping nothing with arrays. I want to assign random ids to each user while iterating. but if I iterate at once all users will get the same random number. I need a way to break and continue so this does not happen
[11:41:23] JasonO: I removed some things. this is what I am working on now per your suggestion phaul https://repl.it/repls/YouthfulGreenyellowCharactermapping
[11:46:09] JasonO: okay I'll move them
[11:48:09] JasonO: no update
[11:48:44] JasonO: oops, forgot index
[11:49:03] JasonO: https://repl.it/repls/YouthfulGreenyellowCharactermapping
[11:49:38] JasonO: nice. it worked!
[11:49:43] JasonO: just needed the index
[11:49:47] JasonO: thanks phaul \
[11:49:53] JasonO: *thanks phaul
[11:51:04] JasonO: aah. okay I'll use sample so no need for ikndex

2018-09-18

[01:33:18] JasonO: Excess Flood
[01:35:55] JasonO: has joined #ruby

2018-09-14

[03:02:09] JasonO: *.net *.split
[03:09:08] JasonO: has joined #ruby

2018-09-10

[12:06:03] JasonO: has joined #ruby