Activity Graph

Page 1 of 6 | Next »


[21:18:23] makerop: Quit: Leaving


[02:18:51] makerop: Ping timeout: 276 seconds
[02:33:34] makerop: has joined #RubyOnRails


[00:12:37] makerop: Ping timeout: 260 seconds
[00:25:07] makerop: has joined #RubyOnRails
[00:25:15] makerop: Client Quit
[00:26:16] makerop: has joined #RubyOnRails


[13:35:58] makerop: Ping timeout: 248 seconds
[14:45:18] makerop: has joined #RubyOnRails
[15:24:12] makerop: Ping timeout: 244 seconds
[16:38:27] makerop: has joined #RubyOnRails


[14:43:12] makerop: has joined #RubyOnRails
[14:44:41] makerop: im in the middle of design, and requirements gathering, I am building a site that has 4 main components, a file store, a client command line app, a dashboard, and I think an API
[14:45:20] makerop: the file store (s3) needs to be multi-tenant, and the commandline client and dashboard need to share an auth mechanism
[14:46:06] makerop: does an API that "links" the dashboard, the filestore, and the client command client, via oath make sense?
[14:47:04] makerop: I was planning on writing a gem
[14:47:20] makerop: and using rest-client and the API


[14:39:55] makerop: has joined #RubyOnRails
[18:55:52] makerop: has left #RubyOnRails: ("Leaving")



[15:31:06] makerop: join #r_netsec


[19:16:42] makerop: rails is about a years worth of AHA moments, then it's easy
[19:17:38] makerop: regnartim, you call APP_PATH twice
[19:17:46] makerop: grep -HRn 'APP_PATH' ./*
[19:19:16] makerop: spring is just the biggest pain in the ass


[20:12:26] makerop: Scriptonaut, model.status_changed?
[20:12:56] makerop: if you need to know when, you can use a call back
[20:13:09] makerop: or there is a gem called auditd
[20:13:26] makerop: audited rather


[20:49:10] makerop: if im using a custom method (in a service) to update a model + external API
[20:49:17] makerop: how do I deal with strong params?
[20:50:17] makerop:
[20:50:49] makerop: im getting ActiveModel::ForbiddenAttributesError: ActiveModel::ForbiddenAttributesError, in my delayed_job worker
[20:57:43] makerop: smathy, my controller, just calls a service to update the model
[20:58:12] makerop: i added my permit block to the controller
[21:11:13] makerop: Sigma00, yeah, looks good
[21:11:14] makerop:
[21:11:18] makerop: just updated it with the hash
[21:11:24] makerop: (it's pretty simple right now)
[21:18:39] makerop: Sigma00, Im having some trouble printing otu the stack trace in a readonable formant
[21:18:52] makerop: delayed_job just wants to put it all on online
[21:30:59] makerop: Sigma00, I removed all validations from profile too
[21:31:03] makerop: was curious if that was it
[21:42:25] makerop: Sigma00, should I define it like in my controller?
[21:42:28] makerop: or just put that line?
[21:44:53] makerop: Sigma00, ActionController::ParameterMissing: param is missing or the value is empty: profile
[21:47:39] makerop: Sigma00, back to ctiveModel::ForbiddenAttributesError: ActiveModel::ForbiddenAttributesError
[21:47:52] makerop: tell me about it
[21:48:12] makerop: Sigma00, yeah
[21:48:24] makerop: I turned off the ones in the modle itself
[21:48:26] makerop: just as a test
[22:01:03] makerop: Sigma00, lol
[22:01:08] makerop: that's what im doing right now
[22:01:12] makerop: and im returnign the profile to the controller
[22:01:23] makerop: and doign the save in the controller
[22:01:40] makerop: seeing if that fixes it
[22:06:15] makerop: thanks Sigma00 that shoudl work
[22:06:26] makerop: i need to refactor, but it's saving right, and seems a lot better


[15:53:57] makerop: you have to models, Profile, and Routes, if an attribute changes on Profile, various Route methods need to be run
[15:54:07] makerop: would you guys use callbacks, or do it in the controller?
[15:54:14] makerop: two models*
[15:55:48] makerop: Sigma00, it must happen always
[16:03:36] makerop: that's a wierd conclusion
[16:06:03] makerop: i think putting any stock in what someones editor is, in regards to their programming ability
[16:06:06] makerop: is ridiculous
[16:08:30] makerop: nothing wrong with notepad imo
[16:09:20] makerop: pulls out handpunch for punchcard
[16:09:42] makerop: hey...if oyu havent used a spiral notebook to write code down
[16:09:51] makerop: probably werent born in the 80s
[16:12:49] makerop: Technodrome, i usually render it as a partial
[16:13:00] makerop: ill do 2 layouts, if the layouts are vastly different
[16:13:05] makerop: like a landing page and a dashboard
[16:13:17] makerop: but if it's a dashboard, with/without a sidebar, partial
[16:18:06] makerop: is that more DRY?


[14:56:30] makerop:
[14:56:40] makerop: can I get some help on why this extermely simple test is failing?
[14:57:20] makerop: why would assigns(:business) be nil
[14:59:32] makerop: it has somethign to do with devise
[14:59:44] makerop: before_action :authenticate_user!, except: [:new], if i add that to the contrtoller the test passes
[15:01:59] makerop: batasrki, why is only the new action failing though?
[15:02:01] makerop: all the rest work fine
[15:02:31] makerop: batasrki, it's just a default install
[15:02:52] makerop: in my rails_helper
[15:02:52] makerop: then i included config.include Devise::TestHelpers, type: :controller
[15:26:38] makerop: can I pass the devise session info with valid_seesion somehow?
[15:56:35] makerop:
[15:56:45] makerop: why would my index, and new tests fail, but show does not?
[16:22:10] makerop: how do i setup allowed network with rails/webbrick?
[16:22:24] makerop: all of a sudden im geting allowed networks: erros when I try to access my dev machine remotely
[16:24:15] makerop: smathy, im passing it -b
[16:24:36] makerop:
[16:24:40] makerop: that's the error im getting
[16:24:52] makerop: with myremoteip beign the ip im working from
[16:25:18] makerop: it's like there is a security setting tellign rails/webbrick not to work with any remote ips
[16:29:44] makerop: np, new one to me
[16:32:40] makerop: intuxicated, that's a rails error
[16:33:24] makerop: rhizome, it's not explicitly called in my gemfile
[16:33:40] makerop: but, ya, somethings pulling it in
[16:33:57] makerop: i see it now, thanks
[16:34:06] makerop: ill whitelist
[19:51:12] makerop: how do you guys handle external API calls typically?
[19:51:33] makerop: say, someone updates an attribute of a profile, and it needs ot then hit an external service after the update
[19:51:48] makerop: and roll back if the external fails etc
[19:52:03] makerop: Im trying to come up with a "declarative" way to do this
[19:52:37] makerop: what would you reccomend
[19:53:38] makerop: so, if it fails, how do you alert the user, if they assumed it was setup ?
[19:53:54] makerop: or, just keep trying..i guess
[19:55:22] makerop: right got ya
[20:10:24] makerop: is it fundamentally wrong to have one model, perform an action on another modle explicitly?
[20:11:56] makerop: weaksauce,
[20:12:32] makerop: in update_routes, in the profile, it is calling self.routes
[20:12:36] makerop: route is another model
[20:14:53] makerop: I am not sure, it seemed like somethign that could live in the model
[20:15:09] makerop: but yeah, now that you say that it makes it tough to test
[20:15:16] makerop: and i can handle the workflow better


[14:40:07] makerop: If I am creating a model record, and need it to depend on another model being created as well, is that "wrong"
[14:41:26] makerop: ie, if I have a an attribute in Profile, when that profile attribute changes, i need it to use my Route model to update an API
[14:41:58] makerop: but if the route model errors when it hits an exteral API, I need to roll everything back
[15:02:16] makerop: elaptics, yes, that works
[15:02:23] makerop: is that the "right way" to do it though
[15:02:48] makerop: ie, I can put a nested attribute in my form, for route
[15:03:09] makerop: and if the Route save fails, roll back the Profile save?
[15:04:41] makerop: elaptics,
[15:05:24] makerop: elaptics, that's what I have now
[15:05:35] makerop: but it seems overly complicated
[15:07:08] makerop: i feel like i shouldnt have that if statement in update_route
[15:07:13] makerop: update_routes*
[15:11:55] makerop: elaptics, so, basically remove the call back and use an embedded form/
[15:12:06] makerop: use begin/fail etc to roll back the transaction if it fails?
[15:16:43] makerop: elaptics, sorry, nested


[14:58:16] makerop: do you guys use presenter patterns for dashboardS?
[16:14:47] makerop: I have a nested form etc
[16:14:48] makerop:
[16:15:01] makerop: this creates a new profile, every time I edit an existing location
[16:15:29] makerop: I just want to edit the location's profile, what am i messing up
[16:16:33] makerop: if I do that, i get an unpermitted param error
[16:16:33] makerop: <%= f.fields_for @location.profile do |p| %>
[16:18:59] makerop: smathy, that did it
[16:19:02] makerop: just changing it to :profile
[19:30:53] makerop: anyone have something I can read on how to test an external api, that has a sandbox/test mode
[19:31:11] makerop: everything Im turning up has stubbing, or mocks involved, but I'd like to actually hit the api
[19:33:54] makerop: yeah, i guess it should be that simple
[19:33:57] makerop: i may be overcomplicating it
[19:34:42] makerop: smathy, why would oyu advise against it?
[19:38:04] makerop: smathy, makes sense
[19:48:04] makerop: upsell5, rake db:schema:dump
[19:48:10] makerop: uptownhr, rather
[19:54:45] makerop: im having some trouble, with a general concept
[19:55:05] makerop: not related to rails necessarily
[19:55:18] makerop: if you have a method, wtih an if statement, and it's checking the state of an attribute
[19:55:25] makerop: do X if nil, do Y if not nil
[19:55:57] makerop: and it interacts iwth an exernal resource
[19:56:16] makerop: if the external resource ever fails, but changes happen locally, the external resource and the local instance are out of sync
[19:56:24] makerop: how do you check for that?
[19:57:05] makerop: ....i know that probably is convoluted, but im having a tough time putting it down on paper
[19:57:45] makerop:
[19:58:15] makerop: in this instance, the only way that route_id should be nil, or not nil, is by interacting with that method
[19:58:57] makerop: but if by some off chance somethign else manipulates route_id, things break, because records could get left on the remote system, that should have been deleted
[20:00:24] makerop: i googled, came up
[20:00:30] makerop: sent sample to my kindle
[20:01:23] makerop: in my example though, should I assume, even though nothing else references it, that route_id may at some point be out of whack, and jump through hoops?
[20:02:53] makerop: yeah, and in my case, I am telling
[20:02:54] makerop: not asking
[20:03:07] makerop: but it's based on an assumptoin
[20:03:27] makerop: erm..well i guess i am asking, with .nil?
[21:47:17] makerop: is there an easy way to validate an attribute, so it is not nil, but not check upon creation?


[15:17:45] makerop: is it possible to use: rails g controller users/registrations_controller.rb?
[15:17:49] makerop: or somethign of that nature?
[15:29:52] makerop: do initializers get loaded when I call rails c?
[15:30:06] makerop: ie, if I have an initializer: mandrill = ENV['PROD_MANDRILL_PASSWORD']
[15:30:17] makerop: I should be able to reference mandrill within the console right?
[15:32:39] makerop: rrawlins, ?
[15:32:46] makerop: sorry, got confused
[15:33:33] makerop: rrawlins, ah, so is there anyway to set it up throughout the app?
[15:35:45] makerop: rrawlins,
[15:36:06] makerop: how can I determine the scope?
[15:39:32] makerop: rrawlins, on a more general note, how did you determine the scope?
[15:39:40] makerop: (so next time I dont have to bother hah"


[14:58:12] makerop: env variables
[15:03:43] makerop: is there a good read on how to test decorators found in controllers
[15:04:04] makerop: ie, im using and want to test the handle_inbound method that will be in the controller
[15:36:33] makerop: config.autoload_paths += %W("#{config.root}/app/decorators/**/")
[15:36:45] makerop: will that not include everythign in the decorators/ directory and below?
[15:40:40] makerop: app/decorators/mandrill/webhook/event_decorator.rb, and the class event_decorator.rb contains is Mandrill::WebHook::EventDecorator
[15:40:50] makerop: but it doesnt seem to load
[15:41:10] makerop: if i require the file explicitly via the console it works
[15:41:14] makerop: oh...spring once again
[15:41:44] makerop: mikecmpbll, that didnt seem to work
[15:44:22] makerop: mikecmpbll, do i need to do anythign special to access it via the console?
[15:44:47] makerop: hrm, I removed the laod_paths
[15:45:01] makerop: ls app/decorators/mandrill/web_hook/event_decorator.rb
[15:45:13] makerop: and im still getting a undefined method
[15:45:29] makerop: I can call Mandrill::WebHook::EventDecorator, but not my override method
[15:47:34] makerop:
[15:48:10] makerop: the mandrill::webhook::eventdecorator comes from the mandrill-rails gem
[15:49:54] makerop: Mandrill::WebHook::EventDecorator[{}].class
[15:49:55] makerop: => Mandrill::WebHook::EventDecorator
[15:52:40] makerop: yeah, i think that will work, but I kind of wanted to avoid that
[15:54:41] makerop: mikecmpbll, that works
[15:55:18] makerop: mikecmpbll, and moving it straight to decoratros/ works too
[15:55:41] makerop: no, i take that back, spring was going
[15:56:08] makerop: mikecmpbll, config/intitializers
[15:57:07] makerop: i guess ill throw it into initializers
[15:57:13] makerop: seems bad though
[15:57:26] makerop: I'm not sure
[15:57:29] makerop: i think ill forget about it
[15:57:39] makerop: app/decorators, makes sense imo


[20:53:37] makerop: im having some trouble with actionmailer and mandrill
[20:54:16] makerop:
[20:55:06] makerop: it's not sending mail, and it's not logging errors
[20:55:49] makerop: getting it from a .env, that is dumping the correct stuff in the console
[20:57:27] makerop: starttls is already true
[20:57:39] makerop: I had tried that intially
[20:57:59] makerop: so, if its use anthony?
[21:00:30] makerop: Wolland,
[21:00:32] makerop: thats the output
[21:00:35] makerop: it seems "okay"
[21:00:42] makerop: it's just not showing up within mandrill
[21:06:53] makerop: yessir, im still geting the same thign
[21:06:58] makerop: I hard coded the pass etc
[21:09:20] makerop: Wolland, arg
[21:09:48] makerop: I was just calling the InvoiceMailer.forward_invoice("email")
[21:11:33] makerop: Wolland, it's not working but at least im geting an error


[17:20:08] makerop: jpstokes, use '\x89PNG' as the arg
[17:20:10] makerop: rather than ""
[17:44:55] makerop: there is no need to escape with ''


[20:21:11] makerop: jsrn, that will def work
[20:21:24] makerop: it just seems like there should be a better way
[20:23:04] makerop: yeah, i didnt mean split