Activity Graph

Page 1 of 2 | Next »


[22:40:46] andybernard: has joined #RubyOnRails
[22:40:46] andybernard: has joined #ruby


[22:01:11] andybernard: has joined #RubyOnRails
[22:01:11] andybernard: has joined #ruby


[01:51:16] andybernard: has joined #RubyOnRails
[01:51:16] andybernard: has joined #ruby
[01:52:18] andybernard: does anyone know how to save "/" in mongoid?
[02:00:55] andybernard: Quit: Leaving


[05:11:28] andybernard: Ping timeout: 265 seconds
[16:10:02] andybernard: has joined #RubyOnRails
[16:10:02] andybernard: has joined #ruby
[19:50:00] andybernard: Ping timeout: 250 seconds


[15:16:02] andybernard: has joined #ruby
[15:16:02] andybernard: has joined #RubyOnRails
[21:31:02] andybernard: i know of none of them that don't use redis
[21:34:35] andybernard: are you still in the process of learning rails nahtnam?
[21:35:36] andybernard: i constantly have redis running on my dev machine so I still type rails s and everything starts
[21:36:10] andybernard: workmad3: forgot about those, yep it doesnt
[21:37:04] andybernard: nahtnam: the reason I ask is because as you learn more it will be inevitable you have other services running parallel to rails
[21:45:47] andybernard: nahtnam: we have 8 gb on our servers and we max out around a queue size of 40,000
[21:48:01] andybernard: probably somewhere around there, and thats only when its queued to run asap
[21:48:21] andybernard: Radar: yes! I heard you can give out access to the !commands
[21:49:08] andybernard: yay! thanks very much
[22:08:19] andybernard: isnt that deprecated? shouldnt it be where(...).first_or_create?
[22:23:42] andybernard: a1fa, be careful about what you capitalize when referring to code.
[22:40:28] andybernard: correct me if I am wrong, but with models you can only call methods on the @object
[22:40:33] andybernard: not the class
[22:45:52] andybernard: rhizome, scopes are different than def method; end
[22:47:32] andybernard: def self.method(params); end
[22:49:00] andybernard: it can be attributes if thats what you want
[22:49:06] andybernard: its just a variable being passed
[23:09:18] andybernard: Intii, redis is amazingly quick
[23:09:46] andybernard: and for my 2 cents, use sidekiq over resque
[23:10:40] andybernard: n00bdev, that is very vague
[23:12:06] andybernard: its bernard :p
[23:14:26] andybernard: n00bdev, if you want it to be in the view you will have to use javascript to populate. I'd handle it at the controller level
[23:14:39] andybernard: Intii, if you have any sidekiq questions I'd be more than happy to help you out
[23:15:42] andybernard: that they are
[23:20:19] andybernard: rhizome, have you tried turning it off and on again?
[23:22:00] andybernard: hahahahahha that is great
[23:23:56] andybernard: is there more than one way to have a namespaced app controller?
[23:24:19] andybernard: you and i both know that is not true
[23:24:25] andybernard: helpa never lies
[23:24:43] andybernard: you have angered it
[23:25:06] andybernard: damn broken...
[23:26:23] andybernard: Radar, why is my code not working? def divide_by_zero; return 15/0; end
[23:26:54] andybernard: Radar, pffffft I'll use cortana
[23:33:07] andybernard: Ping timeout: 255 seconds
[23:58:07] andybernard: has joined #RubyOnRails
[23:58:07] andybernard: has joined #ruby


[00:02:51] andybernard: Ping timeout: 240 seconds
[15:14:57] andybernard: has joined #RubyOnRails
[15:14:57] andybernard: has joined #ruby
[15:23:34] andybernard: Silox|: are you running the app in production or locally?
[15:30:36] andybernard: that is quite odd indeed
[15:31:03] andybernard: its been a while since i've dealt with relative_url_roots
[15:44:26] andybernard: Silox|: I am glad you found a solution, I hadn't found anything
[18:59:43] andybernard: security on your local machine?
[19:00:49] andybernard: Invoice.find_by(...)
[19:05:10] andybernard: staging should always mirror production as far as environment goes, otherwise whats the point?
[19:05:57] andybernard: sounds like NSA level stuff if you are worried about the security of a rails app on mac vs linux on a local machine for testing
[19:06:26] andybernard: To be fair, students with an .edu can get $100 credit to DigitalOcean
[19:07:32] andybernard: chipotle: yes it is, but it doesn't destroy data, only the environment in which it runs
[19:07:56] andybernard: google cloud?
[19:08:02] andybernard: afaik they do not host rails apps
[19:09:28] andybernard: all in all I agree with PapierKorb. Talk of production/staging while learning is getting a bit too far ahead of yourself imo
[19:10:43] andybernard: rails is a gem haha
[19:10:55] andybernard: and a ruby manager, well you should have one anyway
[22:11:40] andybernard: anyone here use subdomains with puma?
[22:13:21] andybernard: *relative url root not subdomain sorry
[22:58:58] andybernard: Ping timeout: 265 seconds


[15:30:54] andybernard: has joined #ruby
[15:31:02] andybernard: has joined #RubyOnRails
[15:32:33] andybernard: has joined #ruby
[15:32:43] andybernard: has joined #RubyOnRails
[16:27:29] andybernard: nzst: shouldnt if; do_some_stuff_since; else; do_other_stuff work?
[16:43:51] andybernard: bricker: thanks, slipped my mind, forget the question mark at the end
[18:52:45] andybernard: and syntax highlighting, but i may just be picky


[01:02:22] andybernard: Read error: Connection reset by peer
[01:03:10] andybernard: has joined #ruby
[01:03:10] andybernard: has joined #RubyOnRails
[01:42:22] andybernard: Read error: Connection reset by peer
[01:43:07] andybernard: has joined #ruby
[01:43:07] andybernard: has joined #RubyOnRails
[03:28:07] andybernard: Ping timeout: 240 seconds


[00:03:59] andybernard: Ping timeout: 246 seconds
[16:52:59] andybernard: has joined #ruby
[16:52:59] andybernard: has joined #RubyOnRails
[17:03:23] andybernard: Quit: Leaving
[17:03:48] andybernard: has joined #ruby
[17:04:06] andybernard: has joined #RubyOnRails
[19:21:07] andybernard: what would be wrong with calling save on the parent?
[19:24:04] andybernard: so if i am understanding your problem correctly, you want to call a before_save on a nested model
[19:24:23] andybernard: but you want the nested model to trigger the before save when it saves, not when the parent saves?
[19:25:59] andybernard: well even if the parent stays the same, still calling a save on it will trigger the child callbacks
[19:27:30] andybernard: ahh ok thats different than i thought
[19:29:01] andybernard: ok i think i understand now
[19:29:21] andybernard: so you have a param being passed, but since its not part of the child, when the parent is saved it doesn't trigger a child call back
[19:29:57] andybernard: does a parent have one child or many?
[19:31:42] andybernard: any way we could see the code?
[19:32:01] andybernard: easier than 20 questions :p
[19:33:02] andybernard: mock the api call
[19:33:10] andybernard: thats what i meant haha
[19:34:17] andybernard: meatchicken:
[19:34:46] andybernard: kegan_: that is a very broad question
[19:35:32] andybernard: does before the object saves help you any?
[19:35:41] andybernard: right before it saves it validates
[19:37:33] andybernard: alright, im taking a look
[19:38:22] andybernard: kegan_: not everything on an object needs to be validated
[19:40:51] andybernard: DCio did you post it already?
[19:40:59] andybernard: i had a look at it but havent gotten the chance to refactor it
[19:41:14] andybernard: not sure if i will get to it though :/
[19:42:11] andybernard: could you repost the link again?
[19:43:12] andybernard: __chris: curious, does this solve your problem? autosave: true to the has many
[19:44:36] andybernard: yeah i had a feeling
[19:46:57] andybernard: DCio you may be able to save some time by parsing the row without having that loop. may not save much time though
[19:47:49] andybernard: yes that wouldn't solve the ActiveRecord creation problem
[19:48:28] andybernard: Dico:
[19:51:33] andybernard: __chris: sorry I couldnt be more help
[20:39:58] andybernard: that is some horribly formatted code lol
[20:40:41] andybernard: atmosx: your index is still borrower_profiles#index
[20:41:05] andybernard: resources :borrower_profiles without the 'only:' will include all rails default routes
[20:54:28] andybernard: __chris: that doesn't seem ideal but if it works it works
[21:05:08] andybernard: atmosx: I appear to have completely misunderstood your problem :p
[21:10:16] andybernard: you didn't put any code except for the random output
[21:34:29] andybernard: hyy_ you got a while issue there
[21:35:39] andybernard: yeah sorry my bad :p I saw that one equals and didnt read the rest
[21:35:57] andybernard: my instinctual programmerness told me it was wrong
[21:40:29] andybernard: what TYPE of data?
[21:41:32] andybernard: oh sorry, checkbox not radio :[
[21:41:46] andybernard: did you check params?
[21:42:11] andybernard: it SHOULD return the value of the checkbox
[21:42:34] andybernard: go into your favorite irb (i use pry) and check the params to see what is getting passed into the update/create action
[21:42:56] andybernard: logfile would work too
[21:44:01] andybernard: do you not have it locally?
[21:44:13] andybernard: your previous comment didnt make any sense
[21:44:26] andybernard: oh thats always fun :p
[21:44:54] andybernard: has many / has_and_belongs_to_many refers to the models, not necessarily the data
[21:45:20] andybernard: yeah ruby is easy to pick up, but rails is more than just ruby :p
[21:46:20] andybernard: nonononono rails on windows is terrible
[21:46:29] andybernard: i had to do it once, never ever ever again haha
[21:46:46] andybernard: itll probably be difficult to get any type of params out of a heroku app
[21:46:54] andybernard: you really need it locally
[21:48:42] andybernard: dual boot and ubuntu :p
[21:51:29] andybernard: moving away from windows is the better choice :p
[21:53:48] andybernard: linux is free!
[21:54:01] andybernard: i totally understand haha
[21:54:09] andybernard: i actually have all 3 os's
[22:14:02] andybernard: Read error: Connection reset by peer
[22:22:51] andybernard: has joined #ruby
[22:22:59] andybernard: has joined #RubyOnRails
[22:23:36] andybernard: whoopsie. dont you hate when you code so hard your entire computer crashes?
[22:24:36] andybernard: what does that even mean?
[22:24:58] andybernard: i literally just saw it haha
[22:25:04] andybernard: im totally stealing that
[22:25:17] andybernard: but you did a bang before it, so does that mean no code yes help?
[22:27:52] andybernard: Radar: I want the bot to love me
[22:28:32] andybernard: rub it in why don't ya?
[23:00:57] andybernard: hnanon: on create or update?
[23:02:20] andybernard: did you add the customer params to the params.require?
[23:03:48] andybernard: oh yes you did
[23:04:57] andybernard: your form looks fine to me
[23:07:13] andybernard: hnanon: im going to create a rails app and test your code myself
[23:09:43] andybernard: your code shouldnt be too hard to isolate
[23:22:26] andybernard: hnanon: id is automatic from rails
[23:24:13] andybernard: hnanon: no. and i solved your problem
[23:24:44] andybernard: replace @customer = @account.build_customer with @customer = @account.customer
[23:24:53] andybernard: and you aren't saving @account anywhere
[23:25:11] andybernard: so save @account and don't do build_customer and you'll be fine
[23:26:30] andybernard: id doesn't get set until save so it can't possibly be in params
[23:27:46] andybernard: i have no idea. ive never seen it in the respond_to block before...
[23:27:56] andybernard: but if you save @account where you save @customer itll save both
[23:29:59] andybernard: if you save @customer before @account, the customer won't have an account_id since the account hasn't been saved
[23:30:49] andybernard: hnanon: told ya all i needed to do was create a project
[23:31:10] andybernard: yes i did, then used pry to take a look at exactly what was happening
[23:31:21] andybernard: it was a VERY butchered version of what you had
[23:31:50] andybernard: no problem :p I needed something to pass the last hour of work
[23:32:26] andybernard: alright, im off. glad i got it working for you hnanon
[23:37:16] andybernard: Ping timeout: 250 seconds
[23:59:43] andybernard: has joined #RubyOnRails
[23:59:43] andybernard: has joined #ruby


[22:33:41] andybernard: I have honestly never had a problem losing data. and even if I did its blazing fast to backup/restore
[22:34:28] andybernard: wait PostgreSQL has json fields?
[22:34:33] andybernard: I honestly never knew that
[22:34:51] andybernard: now that is enticing
[22:36:13] andybernard: interesting...
[22:36:33] andybernard: unfortunately where I work we are quite invested in mongoid now.
[22:36:47] andybernard: its speed is quite beneficial for our large volumes of data
[22:37:14] andybernard: and swapping to postgres would be a nightmare
[22:37:54] andybernard: wouldn't that be nice? haha
[22:40:59] andybernard: hey newport beach! im not far from there
[22:41:04] andybernard: took a look at marketplacer
[22:41:28] andybernard: of course haha
[22:42:00] andybernard: well, southern california is not the most liveable place, prices are absolutely crazy
[22:42:24] andybernard: I could buy a house in any other state (mostly) for the price of my rent
[22:42:30] andybernard: haha I'd be enticed to do so.
[22:43:00] andybernard: I found fairly cheap, 1.5ish
[22:44:25] andybernard: I was on the east coast recently, and like mansion type houses were going for 300k
[22:45:07] andybernard: yeah what part of Vegas haha
[22:45:13] andybernard: outskirts goes for crazy cheap
[22:46:46] andybernard: sorry, i mean you have to plug in the gem to the service object
[22:47:07] andybernard: #mongomasterrace
[22:48:25] andybernard: oooooh yeah i feel for you
[22:55:44] andybernard: no, needs to have a class if I recall correctly
[22:57:25] andybernard: @orders = Order.all
[22:59:17] andybernard: if the .order('created_at desc') wasnt there it'd need to be[:page])
[22:59:30] andybernard: no unfortunately
[22:59:35] andybernard: Order would return the class
[22:59:42] andybernard: not all the entries