wrkrcoop

Activity Graph

Page 1 of 5 | Next »

2019-08-30

[01:35:31] wrkrcoop: has joined #ruby
[02:20:37] wrkrcoop: Quit: wrkrcoop
[15:45:14] wrkrcoop: has joined #ruby
[16:08:56] wrkrcoop: Quit: wrkrcoop

2019-08-29

[23:32:28] wrkrcoop: has joined #ruby
[23:35:59] wrkrcoop: Client Quit

2019-06-25

[14:40:58] wrkrcoop: has joined #ruby
[14:41:10] wrkrcoop: Client Quit
[16:15:42] wrkrcoop: has joined #RubyOnRails
[16:16:03] wrkrcoop: how do i make a post request to rails using postman so that i dont get the “Can't verify CSRF token authenticity” message
[16:16:26] wrkrcoop: Inside: how do i do that
[16:18:33] wrkrcoop: got it thank you
[16:19:02] wrkrcoop: so i am trying to validate the user when creating the post, how do i send back a 404 if the user does not pass validates_associated
[16:19:42] wrkrcoop: hmm searching this page for head: but not finding it https://apidock.com/rails/ActiveModel/Validations/ClassMethods/validates_associated
[16:21:05] wrkrcoop: Inside: data is json
[16:21:09] wrkrcoop: getting the user id from the params
[16:23:31] wrkrcoop: wait where do i define the status code?
[16:25:17] wrkrcoop: Inside: but if i have validates_assocaited inside the model, wont the model return an error before it gets to the controller?
[16:25:29] wrkrcoop: or will the model throw and the controller handles it?
[16:30:44] wrkrcoop: Inside: i’m trying to get this to work but its returning the stuff in rescue_from exception instead https://gist.github.com/ellismarte/5628fae562ed0cfd459209893c275f2a#file-gasdgasdg-rb-L17
[16:38:16] wrkrcoop: Inside: yeah its not gonna get to that point though becaue of the model
[16:38:37] wrkrcoop: Inside: validates_associated :renderer
[16:40:36] wrkrcoop: is an exception a string?
[16:40:39] wrkrcoop: im trying to call include? on it
[16:41:41] wrkrcoop: Inside: https://gist.github.com/ellismarte/5628fae562ed0cfd459209893c275f2a#file-gasdgasdg-rb-L7
[16:43:09] wrkrcoop: Inside: in that rescue block i want to render specific response if the exception includes couldn’t find renderer with
[16:43:29] wrkrcoop: yeah it throws an exception but i want to set the status to 404
[16:43:41] wrkrcoop: as of now it is setting it to unauthorized
[16:44:42] wrkrcoop: mmm maybe i guess
[16:44:49] wrkrcoop: so dont look for the renderer?
[16:47:00] wrkrcoop: Quit: wrkrcoop
[16:57:23] wrkrcoop: has joined #RubyOnRails
[16:57:27] wrkrcoop: how do i use pry in rails?
[16:57:36] wrkrcoop: require ‘pry’
[16:57:42] wrkrcoop: and the binding.pry?
[16:59:01] wrkrcoop: dude i can’t figure out how to use pry with rails
[16:59:08] wrkrcoop: requirigin it and calling binding.pry doesn’t work
[17:00:40] wrkrcoop: Client Quit

2019-06-24

[22:18:52] wrkrcoop: has joined #ruby
[22:19:19] wrkrcoop: i need to check that incoming data is json, can i do request.body.class and if its a Hash is that valid way of checking?
[22:20:21] wrkrcoop: havenwood: how do i check if its json
[22:20:51] wrkrcoop: im in rails world
[22:20:55] wrkrcoop: but figured i could ask here
[22:21:06] wrkrcoop: yeah someones making apost request
[22:22:43] wrkrcoop: havenwood: mmm but im picking a piece off of the body
[22:22:59] wrkrcoop: so even if the content-type is json the thing on the body that im trying to save might not be
[22:23:18] wrkrcoop: havenwood: what do u mean
[22:24:30] wrkrcoop: why can’t i just check if its a hash
[22:41:13] wrkrcoop: Quit: wrkrcoop

2019-06-20

[15:38:15] wrkrcoop: has joined #RubyOnRails
[15:38:38] wrkrcoop: hey i just got asked to update this rails project and i haven’t worked on rails in forever. after i clone the repo do i just run gem install?
[15:41:20] wrkrcoop: looks like maybe its bundle install
[15:51:39] wrkrcoop: has joined #ruby
[15:51:47] wrkrcoop: hey i’m having trouble upgrading rvm
[15:51:58] wrkrcoop: i run rvm get stable
[15:52:10] wrkrcoop: and get Could not update RVM, please report to https://github.com/rvm/rvm/issues
[15:53:11] wrkrcoop: its outputting this: https://gist.github.com/ellismarte/50df5c805ae8b6f99ee8b1607bf6ddf5
[16:53:40] wrkrcoop: adam12: i figured it out
[16:54:26] wrkrcoop: hey im trying to create a new model in rails. if a user has an id, and i want to create a posts model, should the posts have an id and then also a field called user_id? or should user id come first?
[17:33:24] wrkrcoop: how do i open up postgres to view my rails database?
[17:33:30] wrkrcoop: psql doesnt seem to work
[17:50:11] wrkrcoop: https://gist.github.com/ellismarte/108cb50e3c336ac622e201e9cfc3b41a
[17:50:11] wrkrcoop: hey im trying to create a new route
[17:50:15] wrkrcoop: for snapshots
[17:50:48] wrkrcoop: i need post /api/renderers/:uuid/snapshots to work
[17:50:54] wrkrcoop: does that look right?
[17:51:27] wrkrcoop: oops wrong channel
[17:52:05] wrkrcoop: hey im trying to create a new route https://gist.github.com/ellismarte/108cb50e3c336ac622e201e9cfc3b41a for snapshots i need post /api/renderers/:uuid/snapshots to work does that look right?
[18:05:02] wrkrcoop: how do i convert a string to a uuid?
[18:05:34] wrkrcoop: like im trying to insert into active record its expecting a uuid but im passing in a string as a param so i need to convert it to a uuid i believe
[19:26:14] wrkrcoop: Quit: wrkrcoop
[21:19:25] wrkrcoop: has joined #RubyOnRails
[21:19:25] wrkrcoop: has joined #ruby
[21:25:59] wrkrcoop: Quit: wrkrcoop
[22:07:19] wrkrcoop: has joined #RubyOnRails
[22:07:45] wrkrcoop: hey if i’ve got a model/controller for user posts, would i want to use index or show to get all of the user’s posts?
[22:20:33] wrkrcoop: how do i find a list of user’s posts?? Post.find(user_id) doesn’t work
[22:27:43] wrkrcoop: has joined #ruby
[22:27:50] wrkrcoop: anywhere able to answer a rails question?
[22:28:23] wrkrcoop: i have posts and they belong to a user. im not sure how to look up posts using the user_id
[22:29:01] wrkrcoop: I was trying this Post.find(10, :conditions => "user_id = #{params[:user_id]}", :order => "created_on DESC")
[22:40:12] wrkrcoop: dopie: what do u mean
[22:40:25] wrkrcoop: user_id isn’t params id?
[22:40:47] wrkrcoop: dopie: but i want all the posts where user_id == user_id
[22:41:00] wrkrcoop: im not sure why its not working
[22:41:34] wrkrcoop: mm i have posts belong to users
[22:42:59] wrkrcoop: mmm i might
[22:43:03] wrkrcoop: i need user has many posts?
[22:43:14] wrkrcoop: dopie: but i want the posts to be paginated
[22:43:21] wrkrcoop: i dont want to return all of the posts at once
[22:43:27] wrkrcoop: how do i do that?
[22:43:52] wrkrcoop: i only want to return data though
[22:44:37] wrkrcoop: haven’t touched rails since 2015
[22:46:42] wrkrcoop: alright thanks dopie work is over time to go home
[22:46:45] wrkrcoop: have a good night
[22:46:46] wrkrcoop: Quit: wrkrcoop

2019-02-26

[15:48:04] wrkrcoop: has joined #ruby
[15:48:54] wrkrcoop: what tools do you use that you wouldn’t want to dev without?
[18:05:52] wrkrcoop: has left #ruby: ()

2018-06-13

[17:56:07] wrkrcoop: has joined #ruby
[17:56:44] wrkrcoop: hello. i haven’t used ruby in a while, i’m trying to do something with node but it’s not working, it seems to work with ruby so i figured i’d just use sinatra
[17:56:56] wrkrcoop: i only need like one route does anyone have a sinatra skeleton that i can use?
[18:08:47] wrkrcoop: Ping timeout: 265 seconds

2017-04-12

[22:21:04] wrkrcoop: has joined #ruby
[22:21:11] wrkrcoop: do i need to close a file in ruby if i use open?
[22:21:39] wrkrcoop: seems like there’s a memory leak … wondering if that is the problem
[22:22:31] wrkrcoop: elomatreb: u mean we use { } or do end
[22:23:18] wrkrcoop: ok yeah we are using the { do stuff } approach
[22:57:49] wrkrcoop: Quit: wrkrcoop
[23:28:32] wrkrcoop: has joined #ruby
[23:55:36] wrkrcoop: Quit: wrkrcoop

2017-03-28

[18:18:04] wrkrcoop: has joined #ruby-offtopic
[18:18:56] wrkrcoop: i was thinking if a new person comes on the team, they would be way more productive if they worked on new features instead of old features, would you agree?
[18:19:41] wrkrcoop: im also thinking someone can be a good front end engineer or backend engineer, but that doesn’t mean they are a good engineer, would you agree?
[18:54:39] wrkrcoop: Quit: wrkrcoop
[19:59:23] wrkrcoop: has joined #ruby-offtopic
[21:13:30] wrkrcoop: Quit: wrkrcoop

2017-03-08

[17:16:33] wrkrcoop: has joined #ruby
[17:30:27] wrkrcoop: Quit: wrkrcoop

2016-07-29

[00:06:26] wrkrcoop: has joined #RubyOnRails
[00:06:26] wrkrcoop: has joined #ruby
[00:42:26] wrkrcoop: Quit: wrkrcoop

2016-07-28

[16:07:52] wrkrcoop: has joined #RubyOnRails
[16:08:11] wrkrcoop: does rails hash user data in local storage?
[16:19:41] wrkrcoop: matthewd: like lets say i store some user data on the client in local storage
[16:20:10] wrkrcoop: is that data hashed so someone can’t read it if they look in local storage
[16:44:18] wrkrcoop: Quit: wrkrcoop
[16:58:21] wrkrcoop: has joined #RubyOnRails
[19:42:32] wrkrcoop: Quit: wrkrcoop
[20:24:28] wrkrcoop: has joined #RubyOnRails
[20:53:23] wrkrcoop: has joined #ruby
[20:53:26] wrkrcoop: anyone use apigee? my company does and im wondering what is the main benefit of apigee? why not just let ppl hit our aws servers?
[20:59:31] wrkrcoop: drbrain: waf?
[21:00:08] wrkrcoop: how does it act as a firewall?
[21:01:56] wrkrcoop: drbrain: oh interesting
[21:59:49] wrkrcoop: thanks drbrain
[22:04:30] wrkrcoop: Quit: wrkrcoop
[22:05:29] wrkrcoop: has joined #RubyOnRails
[22:05:29] wrkrcoop: has joined #ruby
[23:45:33] wrkrcoop: Quit: wrkrcoop
[23:46:13] wrkrcoop: has joined #RubyOnRails
[23:46:13] wrkrcoop: has joined #ruby
[23:47:33] wrkrcoop: Client Quit

2016-07-27

[22:40:24] wrkrcoop: has joined #ruby
[22:46:17] wrkrcoop: oauth is just a request for an access token… so if someone supports oauth 2 are they juts looking for some oauth2 header and some value?
[22:48:31] wrkrcoop: Radar: isn’t that what u end up getting if its successful?
[22:49:29] wrkrcoop: so after u get the token u just send it in the header?
[22:50:18] wrkrcoop: correct grammar is a construct of the bourgoisie
[22:50:37] wrkrcoop: meant to discredit the working class
[22:52:40] wrkrcoop: has left #ruby: ()

2016-07-26

[00:47:41] wrkrcoop: has left #ruby: ()

2016-07-25

[23:56:04] wrkrcoop: has joined #ruby
[23:56:09] wrkrcoop: how do i stub a method in a module?

2016-07-24

[18:51:54] wrkrcoop: has joined #ruby
[18:52:40] wrkrcoop: Client Quit

2016-07-23

[00:31:56] wrkrcoop: has joined #ruby
[01:32:22] wrkrcoop: Quit: wrkrcoop
[03:08:05] wrkrcoop: has joined #ruby
[03:11:15] wrkrcoop: can i just add a question mark to the end of a method if it returns boolean or does a question mark change the method?
[03:16:50] wrkrcoop: just checking thank you adam12
[03:17:42] wrkrcoop: using plain ruby
[03:30:44] wrkrcoop: Quit: wrkrcoop

2016-07-22

[01:07:19] wrkrcoop: Quit: wrkrcoop
[16:30:42] wrkrcoop: has joined #ruby
[16:31:15] wrkrcoop: i have this string object, and when i call JSON.parse(message.body) it returns a hash but its wrapped in a hash with no key …
[17:35:48] wrkrcoop: Quit: wrkrcoop
[17:39:27] wrkrcoop: has joined #ruby
[18:54:44] wrkrcoop: Quit: wrkrcoop
[20:01:48] wrkrcoop: has joined #ruby
[20:30:27] wrkrcoop: Quit: wrkrcoop
[20:45:48] wrkrcoop: has joined #ruby
[20:46:00] wrkrcoop: Client Quit
[20:46:54] wrkrcoop: has joined #ruby
[20:47:13] wrkrcoop: Client Quit
[20:48:19] wrkrcoop: has joined #ruby
[22:24:25] wrkrcoop: Quit: wrkrcoop

2016-07-21

[00:07:04] wrkrcoop: Quit: wrkrcoop
[18:58:49] wrkrcoop: has joined #ruby
[18:59:38] wrkrcoop: so i have to build this retry mechanism that publishes a message to sqs if it hasn’t been retried <3 times
[19:00:18] wrkrcoop: im thinking of something something like this https://gist.github.com/ellismarte/ca4da72946893a0c6cc2caea40344c9e
[19:00:52] wrkrcoop: i want to call another method if the condition is false, is yield what i want to use?
[19:21:02] wrkrcoop: havenwood: mm i want to send it to the dead letter queue
[19:21:24] wrkrcoop: so i want to call the method that sends it to the DLQ
[19:24:24] wrkrcoop: havenwood: yeah, so if i want to call a method if the condtion is not true, and i want the user to decide what method that is, how should i go about that? use procs?
[19:28:40] wrkrcoop: havenwood: i dont think so if i understand the question, i just want to call a user defined method
[19:29:16] wrkrcoop: havenwood: idk, i was wondering the same thing
[19:29:46] wrkrcoop: so i pass the method name like this :dead_letter_queue
[19:31:04] wrkrcoop: hmm it seems i dont even have to do that
[19:32:21] wrkrcoop: this seems to work: https://gist.github.com/ellismarte/f3928fd60f49b09158debae88b70d220
[19:34:01] wrkrcoop: yeah, i want to call the method with a hash as an argument and one of the key’s values to be the method
[19:42:47] wrkrcoop: why is this: https://gist.github.com/ellismarte/f3928fd60f49b09158debae88b70d220 giving me a wrong number of arguments (given 0, expected 1) for say
[19:46:38] wrkrcoop: havenwood: so why doesnt this call: https://gist.github.com/ellismarte/f3928fd60f49b09158debae88b70d220#file-gistfile1-rb-L5
[19:46:41] wrkrcoop: with the argument
[19:47:59] wrkrcoop: how do i get around that? pass it as a symmbol?
[19:59:45] wrkrcoop: havenwood: yes this seems to work https://gist.github.com/ellismarte/f3928fd60f49b09158debae88b70d220
[19:59:49] wrkrcoop: why not send?
[20:00:00] wrkrcoop: what do you think of my code?
[20:00:18] wrkrcoop: ill change last_resort to something else
[20:02:59] wrkrcoop: what is that?
[20:03:26] wrkrcoop: do those pass the params to the say method?
[20:08:39] wrkrcoop: yeah send works
[20:09:55] wrkrcoop: havenwood: i feel like this isn’t good enough because i’m forcing the user to always accept message[“body”] as an argument …
[20:28:15] wrkrcoop: Quit: wrkrcoop
[21:05:09] wrkrcoop: has joined #ruby

2016-07-20

[23:37:57] wrkrcoop: has joined #ruby
[23:38:04] wrkrcoop: how do i add something to my path?
[23:39:38] wrkrcoop: in my shizell
[23:40:32] wrkrcoop: i opened up my ~/.bash_profile
[23:41:12] wrkrcoop: i’ve got export PATH= but then i dont understand what comes next
[23:41:18] wrkrcoop: then i just put the path to my file?
[23:41:41] wrkrcoop: so export PATH=$PATH:”/Users/martee/Documents/scala-2.11.8/bin”
[23:41:47] wrkrcoop: what is $PATH?
[23:42:50] wrkrcoop: what does export do
[23:43:06] wrkrcoop: yesss it worked
[23:52:15] wrkrcoop: im trying to set an environment variable: export $SCALA_HOME=/usr/local/share/scala
[23:52:48] wrkrcoop: it says ‘export: `=/usr/local/share/scala': not a valid identifier'

2016-07-19

[00:05:51] wrkrcoop: how do i create a class with a class variable?
[00:50:49] wrkrcoop: Quit: wrkrcoop
[05:31:09] wrkrcoop: has joined #ruby
[05:31:26] wrkrcoop: how can i go about getting audio from a user using ruby?
[05:31:42] wrkrcoop: i want to write a function that turns on the mic and lets the user record something
[05:37:02] wrkrcoop: Quit: wrkrcoop

2016-07-18

[22:11:21] wrkrcoop: jhass smart