mattwc

Activity Graph

Page 1 of 1

2019-07-07

[06:10:36] mattwc: Ping timeout: 270 seconds
[06:11:29] mattwc: has joined #RubyOnRails
[06:11:35] mattwc: has joined #ruby

2019-06-01

[04:36:16] mattwc: Ping timeout: 276 seconds
[04:54:02] mattwc: has joined #RubyOnRails
[04:54:04] mattwc: has joined #ruby

2019-05-03

[21:39:06] mattwc: *.net *.split
[22:07:26] mattwc: has joined #RubyOnRails
[22:07:28] mattwc: has joined #ruby

2019-04-28

[06:07:07] mattwc: Ping timeout: 240 seconds
[06:09:10] mattwc: has joined #RubyOnRails
[06:09:16] mattwc: has joined #ruby

2019-04-13

[16:49:46] mattwc: *.net *.split

2019-04-12

[07:06:19] mattwc: Read error: Connection reset by peer
[07:06:32] mattwc: has joined #RubyOnRails
[07:06:37] mattwc: has joined #ruby

2018-11-07

[20:47:43] mattwc: Ping timeout: 252 seconds
[20:48:01] mattwc: has joined #RubyOnRails
[20:48:03] mattwc: has joined #ruby

2018-09-06

[17:42:29] mattwc: has joined #ruby
[17:42:32] mattwc: has joined #RubyOnRails

2018-09-03

[19:10:25] mattwc: *.net *.split

2018-08-16

[17:18:41] mattwc: has joined #RubyOnRails
[17:18:44] mattwc: has joined #ruby

2018-08-15

[09:18:05] mattwc: Read error: Connection reset by peer

2018-07-26

[20:31:03] mattwc: has joined #RubyOnRails

2018-07-23

[15:19:55] mattwc: Ping timeout: 256 seconds
[15:23:08] mattwc: has joined #ruby

2018-07-20

[00:07:22] mattwc: *.net *.split
[00:15:28] mattwc: has joined #RubyOnRails
[00:15:47] mattwc: has joined #ruby

2018-06-20

[03:50:45] mattwc: Ping timeout: 256 seconds
[05:33:28] mattwc: has joined #RubyOnRails
[05:33:30] mattwc: has joined #ruby
[05:56:58] mattwc: Ping timeout: 256 seconds
[06:20:59] mattwc: has joined #RubyOnRails
[06:21:02] mattwc: has joined #ruby

2018-05-29

[02:47:10] mattwc: *.net *.split
[02:47:46] mattwc: has joined #RubyOnRails
[02:48:03] mattwc: has joined #ruby

2018-05-19

[14:41:23] mattwc: Ping timeout: 256 seconds
[14:43:56] mattwc: has joined #RubyOnRails
[14:43:59] mattwc: has joined #ruby

2018-04-25

[12:25:53] mattwc: *.net *.split
[12:27:20] mattwc: has joined #ruby
[12:27:34] mattwc: has joined #RubyOnRails
[15:01:24] mattwc: *.net *.split
[15:03:04] mattwc: has joined #RubyOnRails
[15:03:17] mattwc: has joined #ruby
[15:33:59] mattwc: has joined #RubyOnRails
[15:34:01] mattwc: has joined #ruby

2018-04-10

[14:13:45] mattwc: has joined #RubyOnRails
[14:13:47] mattwc: has joined #ruby

2018-03-18

[07:18:47] mattwc: Read error: Connection reset by peer

2018-03-02

[04:17:15] mattwc: has joined #RubyOnRails
[04:17:18] mattwc: has joined #ruby

2018-02-28

[23:23:14] mattwc: Ping timeout: 276 seconds
[23:25:30] mattwc: has joined #RubyOnRails
[23:25:32] mattwc: has joined #ruby
[23:25:48] mattwc: Max SendQ exceeded
[23:26:14] mattwc: has joined #RubyOnRails
[23:26:20] mattwc: has joined #ruby

2018-02-20

[04:04:54] mattwc: you don't really compile with ruby, you just reload the code / restart the web server to load the changes
[04:07:36] mattwc: ah you're talking about front end code compliation
[04:09:51] mattwc: that kinda depends on how you built your front end stuff, if you're using the default rails asset pipeline, etc http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets talks about how to pre-compile the assets assuming the default / built in pipeline
[04:16:47] mattwc: arthurz: the link I provided has the rake task to compile assets
[04:17:08] mattwc: well the rails task to compile assets

2018-02-17

[03:43:03] mattwc: rubycoder38: an initialize method should return an instance of the model you created
[03:46:11] mattwc: yeah either an instance or class method
[03:47:50] mattwc: so an instance method is something where the method depends on information about a specific instance of the object
[03:48:11] mattwc: so if you had a Car class, `color` would most likely be an instance method since its the color of a specific car
[04:07:51] mattwc: something like this? https://www.irccloud.com/pastebin/dTH99wYE/
[04:20:24] mattwc: i mean transfer could probably be simplified just by defaulting target_currency to currency right?
[04:20:36] mattwc: since it'd just do a 1 to 1 conversion if they're the same
[04:33:42] mattwc: vutral|kali: match returns an array of matches https://ruby-doc.org/core-2.2.0/Regexp.html#method-i-match
[04:41:06] mattwc: rubycoder38: only do that if target_currency is nil
[04:51:40] mattwc: what the purpose of recipient currencies?
[04:54:46] mattwc: so you couldn't transfer from BRL to USD then?
[04:54:58] mattwc: (or at least not do so with proper currency conversion)
[04:55:35] mattwc: looks like even USD to USD transfers might end up weird too
[05:00:53] mattwc: yeah USD to BRL will work, basically your currency convert method needs to know the source and destination currency
[05:01:13] mattwc: the when "USD" case doesn't really make sense since price will always end up as $1
[05:06:17] mattwc: If I was designing the function, I'd force Currency#convert to take source and destination currency and not allow either to be nil
[05:22:01] mattwc: have you taken a look at pry and pry-nav?
[05:23:36] mattwc: it adds next / continue / step to pry
[05:24:04] mattwc: and then some unit tests on things like Currency#convert would probably be useful
[05:55:11] mattwc: yeah, without some sort of api, you're basically going to need to store a mapping of all the exchange rates
[05:58:10] mattwc: happy to help

2018-02-09

[21:36:10] mattwc: I might just be blind, but does anyone know where the documentation for socket.gets is?
[21:37:20] mattwc: ah yeah its in IO

2018-02-05

[02:28:43] mattwc: atchoum: you can write a "service"
[02:28:49] mattwc: and the controller can call the service
[02:32:34] mattwc: I wouldn't say its rails specifically, its more an MVC thing https://softwareengineering.stackexchange.com/questions/230307/mvc-what-is-the-difference-between-a-model-and-a-service
[02:34:58] mattwc: it is built into rails
[14:52:03] mattwc: prutheus: hmmm, you can't really define the same key multiple times, I think you'd be better off just making your own raw requests and constructing the URL yourself
[14:54:29] mattwc: I don't see an easy way too, hashes can only have a key defined one and the eBay API ways the same key multiple times
[14:56:01] mattwc: Yeah reading the code last night that wouldn't work from my memory
[14:56:49] mattwc: It just does a very basic string interpolation of "?#{key}=#{value}"
[14:57:46] mattwc: At this point, I'd just build the request yourself using like restclient or something
[15:00:13] mattwc: prutheus: if that works sweet
[16:39:27] mattwc: morfin: yep http://api.rubyonrails.org/classes/DateTime.html#method-i-to_i
[16:54:37] mattwc: za1b1tsu: looking at their docs and code, the first page is 1
[18:36:40] mattwc: barhum2013: a single rails instance can handle 1 request, your webserver could have multiple instances of rails running though

2018-02-04

[16:33:40] mattwc: kapil___: what do you mean by its not working?
[18:26:21] mattwc: garyserj: https://stackoverflow.com/questions/2011654/undefine-variable-in-ruby
[18:26:53] mattwc: There isn't a way for local variables though
[19:04:01] mattwc: prutheus: thats a 4 year old library that doesn't appear to be very popular or touched, I doubt many people in here would know whats wrong
[19:12:02] mattwc: prutheus: both those gems haven't been updated in years, if I was to guess, I'd say over the last 5 years, ebay updated their api
[19:14:55] mattwc: I don't know, if ebay changed their api probably not
[19:15:37] mattwc: ebayr does seem less abandoned though
[19:16:17] mattwc: craysiii: most of that stuff exists as active support
[19:24:19] mattwc: prutheus: how am I supposed to know?
[19:30:13] mattwc: prutheus: I'm just throwing out random examples, the first two libraries are 5 years old and haven't been touched in 5 years, the fact they even worked is a bit surprising
[19:46:20] mattwc: at this point I'd just write my own api wrapper
[19:55:36] mattwc: prutheus: that would be a better question for an ebay api expert but that looks like a very weird way to structure an api request
[19:57:48] mattwc: based on my reading of their api docs yes
[20:16:51] mattwc: it looks like if its a param they'd send the filter in the request
[20:20:42] mattwc: it looks like they support it
[20:32:14] mattwc: i'd try like ({'keywords': 'Acer', 'itemFilter(0).name':'MinPrice'...})
[20:37:40] mattwc: its just some different syntax, they are the same thing but the name: won't really work with special characters (like ())

2018-02-03

[01:05:02] mattwc: the chrome developer tools will let you monitor network requests and even copy them as curl

2018-02-02

[01:37:30] mattwc: freedrull: more columns can have bad performance implications depending on the database
[01:38:07] mattwc: since updating a single column could have an affect on the entire row
[02:04:52] mattwc: like postgres, if you update a column it ends up writing the whole row again and then vacuuming away the old row
[02:08:25] mattwc: kapil___: you don't need it, but it is a popular method for adding authentication
[02:10:58] mattwc: kapil___: my answer still stands
[02:13:54] mattwc: kapil___: you're a developer so you're welcome to do it yourself. Its worth noting that tons of issues with authentication and authorization and lots of security issues in applications are because a developer decided to do it themselves and they forgot about one edge case
[02:14:17] mattwc: the main benefit is you're not doing it yourself and it handles a decent chunk of it for you
[02:18:52] mattwc: kapil___: its not only, its just mostly used internally. apis don't tend to use cookies though...
[02:20:26] mattwc: kapil___: rememberable is for writing and clearing cookies...
[02:21:50] mattwc: kapil___: it depends on what you're building and what type of authentication you need. If it works for you great
[02:23:31] mattwc: so you're the backend to a like single page app?
[02:24:25] mattwc: tokens tend to be standard for that. They authenticate and you provide a token that is valid for some period of time and they include that token in each request
[02:25:35] mattwc: presumably you're communicating over https and not plain text
[02:25:46] mattwc: the password would be visible in parameters no?
[02:26:32] mattwc: so whats the difference between the password and the token?
[02:26:50] mattwc: they're both authorizations for the users (so both should be transmitted only via tls)
[02:30:22] mattwc: there are lots of token addons for devise. https://github.com/adamniedzielski/tiddle looks pretty simple
[02:31:09] mattwc: https://github.com/gonzalo-bulnes/simple_token_authentication is also pretty popular
[02:37:24] mattwc: kapil___: you have like ` before_action :authenticate_user!` and then you'd just be able to access `current_user` https://github.com/plataformatec/devise#controller-filters-and-helpers
[03:55:51] mattwc: westies: googling switch statement ruby should have a million examples
[05:53:06] mattwc: regedit: are you currently having speed issues in your cycle?
[05:55:01] mattwc: regedit: there are tools (like guard) that would automatically reload your code for you
[05:56:16] mattwc: https://github.com/guard/guard-livereload/blob/master/README.md
[06:00:18] mattwc: Yeah I'd be just mostly be rspec testing that
[18:46:33] mattwc: MrCrackPotBuilde: <li> aren't by default clickable elements
[18:46:42] mattwc: what are you doing to them to make them clickable
[18:50:46] mattwc: you can add some javascript to detect when they are clicked or make them links
[19:56:16] mattwc: MrCrackPotBuilde: how are you building the filters? a li is just a list item so how are you hooking that up to a filter?

2018-01-18

[03:30:04] mattwc: *.net *.split
[03:31:31] mattwc: has joined #ruby
[03:31:31] mattwc: has joined #RubyOnRails

2018-01-15

[19:50:56] mattwc: amperry: a form should submit every input which has a name attribute
[23:08:23] mattwc: tycoon177: https://mensfeld.pl/2014/09/activerecord-count-vs-length-vs-size-and-what-will-happen-if-you-use-it-the-way-you-shouldnt/
[23:09:10] mattwc: size will do length if the collection is loaded otherwise it would do count

2017-12-27

[19:14:12] mattwc: Ping timeout: 240 seconds
[19:51:48] mattwc: has joined #ruby
[19:51:48] mattwc: has joined #RubyOnRails

2017-12-11

[23:56:28] mattwc: Ping timeout: 258 seconds
[23:59:37] mattwc: has joined #ruby
[23:59:37] mattwc: has joined #RubyOnRails

2017-12-08

[07:07:06] mattwc: Read error: Connection reset by peer
[07:07:43] mattwc: has joined #ruby

2017-12-07

[14:48:31] mattwc: *.net *.split
[14:55:11] mattwc: has joined #ruby

2017-12-06

[19:15:57] mattwc: has joined #RubyOnRails
[19:16:31] mattwc: if I have a `parent.childen.save` is that expected to trigger the `before_save` callback on the parent?
[19:20:07] mattwc: they're models, like author and books. But I figured it out, books had an after_save callback that modified author

2017-10-06

[02:12:37] mattwc: Read error: Connection reset by peer

2017-08-14

[23:51:31] mattwc: *.net *.split
[23:54:07] mattwc: has joined #ruby

2017-07-12

[12:41:22] mattwc: Read error: Connection reset by peer

2017-06-20

[00:17:20] mattwc: *.net *.split
[00:22:40] mattwc: has joined #RubyOnRails
[00:23:10] mattwc: has joined #ruby

2017-06-05

[06:50:09] mattwc: *.net *.split
[06:50:52] mattwc: has joined #RubyOnRails
[06:50:52] mattwc: has joined #ruby

2017-06-04

[20:46:11] mattwc: *.net *.split
[20:47:38] mattwc: has joined #ruby
[20:47:39] mattwc: has joined #RubyOnRails

2017-06-01

[01:01:19] mattwc: if its a nested charge route shouldn't the url end up being /items/itemid/charges/create? so the item id is part of the url
[01:07:42] mattwc: So the item can only be made active once? You'd need to update it in code when you hit the condition that should make it true
[01:12:10] mattwc: You could only create a charge if the charge is successful, it should have a foreign key to the item since rails would so that automatically
[01:16:39] mattwc: I would just mark the item as active when you check the response from stripe
[01:18:05] mattwc: Like you had in your if statement
[01:21:06] mattwc: The create charge api call returns a charge object (or throws an exception) if you get a charge back then activate the item
[01:26:48] mattwc: Ruby has name spacing for that

2017-05-09

[00:03:28] mattwc: Ping timeout: 240 seconds

2017-05-05

[13:02:52] mattwc: *.net *.split
[13:14:31] mattwc: has joined #RubyOnRails
[13:14:31] mattwc: has joined #ruby
[13:26:31] mattwc: *.net *.split
[13:27:28] mattwc: has joined #RubyOnRails
[13:27:28] mattwc: has joined #ruby

2017-05-04

[00:20:47] mattwc: has joined #RubyOnRails
[00:20:47] mattwc: has joined #ruby
[09:51:50] mattwc: has joined #RubyOnRails
[09:51:50] mattwc: has joined #ruby
[16:35:44] mattwc: Read error: Connection reset by peer
[16:41:01] mattwc: has joined #ruby
[16:41:03] mattwc: has joined #RubyOnRails

2017-05-03

[22:28:47] mattwc: Ping timeout: 240 seconds

2017-05-01

[16:41:11] mattwc: *.net *.split
[16:52:20] mattwc: has joined #RubyOnRails
[16:52:20] mattwc: has joined #ruby

2017-04-28

[00:14:38] mattwc: has joined #RubyOnRails
[00:14:38] mattwc: has joined #ruby

2017-04-27

[22:17:10] mattwc: Ping timeout: 240 seconds

2017-03-30

[17:59:34] mattwc: Ping timeout: 276 seconds
[19:55:31] mattwc: has joined #RubyOnRails
[19:55:31] mattwc: has joined #ruby