Activity Graph

Page 1 of 16 | Next »


[21:04:25] Inside: Quit: leaving


[15:48:21] Inside: has joined #RubyOnRails


[06:01:43] Inside: Ping timeout: 245 seconds



[16:22:34] Inside: capistrano?


[14:26:40] Inside: Quit: leaving
[15:48:41] Inside: has joined #RubyOnRails
[17:09:35] Inside: jsierles: how do you see that it's being required?
[17:10:35] Inside: interesting
[17:10:54] Inside: Sounds like I should use this gem too
[17:13:01] Inside: ah, action_mailbox is a rails 6 thing
[17:13:04] Inside: was wondering why I hadn't heard of it


[15:05:52] Inside: Why do you need -infinity?
[19:08:45] Inside: all the cool techie kids hacking away at rails are now at their 9-9 jobs working on it professionally
[22:45:32] Inside: ACTION sits on havenwood 


[15:28:34] Inside: JS gives you so many ways to shoot yourself in the dick
[18:09:56] Inside: yoshie902a: you're not wrong
[18:09:59] Inside: people have moved to slacks, etc
[18:18:50] Inside: I haven't looked
[18:18:52] Inside: but most likely
[18:19:01] Inside: I've seen slack for tiny minor libraries for smaller languages
[19:17:13] Inside: why not just use an existing web front?
[19:17:24] Inside: it'll be cheaper than rolling your own?
[19:18:38] Inside: I mean I know it's fun to
[19:18:42] Inside: and if it's your job, then do it :)
[19:21:38] Inside: There are SaaS ecommerce fronts
[19:21:51] Inside: ahh, well that's a majorly different requirement
[19:22:40] Inside: I would still, perhaps, use an existing SaaS ecommerce front and then build a configurator that'll redirect the user to the page for the individual product
[19:23:19] Inside:
[19:23:21] Inside: check that out
[19:23:50] Inside: nvm, it changed
[19:24:00] Inside: previously they had a "answer some questions" picker
[19:24:45] Inside: yeah, basically
[19:25:23] Inside: I guess it depends on whether you are the person developing the site (ie: want to charge as many hours as you can and justify your existence), or if you're the person selling and want to minimize dev costs
[19:25:57] Inside: (And reasonable minds can disagree)
[19:32:15] Inside: Look at available e-commerce options and see if their cut is less than what you'd spend developing your own site
[19:32:43] Inside: Depending on your country it may be cheaper to develop your own (ie: if you're from eastern europe)


[15:31:30] Inside: I don't quite get it
[15:31:39] Inside: So you have a new user form, you have to specify a contact_id in a box, right?
[15:31:43] Inside: what do you want to do with that contact id?
[15:32:02] Inside: pop up stuff on the side so that you can verify that the contact information is correct?
[15:32:06] Inside: but not modify it?
[15:32:28] Inside: poor reading comprehension
[15:32:48] Inside: I don't think UJS is what you want here
[15:32:57] Inside: you'll have to go full on jquery or similar
[15:36:19] Inside: break it up into a number of tasks - can you create a jquery script that loads in a list of contacts based on a partial match?
[15:36:57] Inside: you're looking for json here, btw, not js
[15:38:50] Inside: (I mean you can use ujs, but for some reason I haven't wrapped my head around returning js to be executed in the browser as a thing I want to do)
[15:42:37] Inside: anyway, you would do the following: have an anchor div: <div id="search_results"></div>
[15:48:04] Inside: what are you trying to do right now
[16:18:25] Inside: Quit: leaving
[17:39:15] Inside: has joined #RubyOnRails
[17:55:14] Inside: ooh this is awesome
[17:55:25] Inside: embedding rubyracer to execute business logic JS
[21:36:34] Inside: I want my next job to be something fulfilling
[21:36:38] Inside: so probably not coding :P
[21:55:04] Inside: too selfless
[22:02:29] Inside: what hath god wrought?!
[22:56:29] Inside: why not ujs?
[22:58:34] Inside: ah well depends on your use case
[22:58:59] Inside: do you need to fetch the selectable options from a db?
[23:00:05] Inside: why not a bit of jquery?
[23:02:22] Inside: is that in your controller?
[23:02:33] Inside: that's... not very good
[23:03:15] Inside: I guess it depends
[23:03:19] Inside: if it works, ship it


[13:52:48] Inside: pavelz: ummm
[13:53:20] Inside: no gem needed, you just need to use store :attribute_name
[13:54:21] Inside: serialize :attribute_name, JSON
[22:22:01] Inside: anoob: ummm
[22:22:04] Inside: are you running in a VM?
[22:22:34] Inside: config.file_watcher = ActiveSupport::FileUpdateChecker
[22:22:40] Inside: do you have that in your development.rb ?
[22:23:11] Inside: (er.. is your code in a shared folder somehow)
[22:33:57] Inside: I want to create a business rules system that's user editable
[22:34:09] Inside: but that would require some sort of simplified DSL and then storing the code in a db
[22:34:12] Inside: which sounds uuuugly


[16:19:43] Inside: how do you reference it in devise?
[16:20:37] Inside: Err - you shouldn't have to do anything - it should automatically bundle up all of your css and js and insert it into the layout that will be used to render the devise view
[16:21:11] Inside: unless you're doing controller specific css and js
[16:23:12] Inside: I.. just said the same stuff as the SO thread lol
[19:32:20] Inside: that's odd
[19:32:29] Inside: what does your application.html layout look like
[21:57:22] Inside: isn't posts_attributes supposed to be an array
[21:57:36] Inside: ie: posts_attributes: [ {body: "foo"}, {body: "bar"}].
[21:58:01] Inside:
[22:03:53] Inside: ok wellThe keys of the hash which is the value for :posts_attributes are ignored in this case. However, it is not allowed to use 'id' or :id for one of such keys, otherwise the hash will be wrapped in an array and interpreted as an attribute hash for a single post.
[22:04:06] Inside: so it doesn't matter
[22:08:07] Inside: well it's curious
[22:09:13] Inside: I'm literally reading from the docs
[22:22:58] Inside: ah, I think I know what it might be
[22:32:58] Inside: absurdly even if I Change your Title to has_many :polls and change your schema it still doesn't want to save
[22:34:41] Inside: but if I take out topic.with_lock it works
[22:35:21] Inside: yeah, I get your test to pass if I take out that transactional lock
[22:35:41] Inside: ACTION shakes LiamW 
[22:35:59] Inside: ACTION shakes LiamW harder
[22:37:19] Inside: is it though?
[22:40:23] Inside: so... with_lock reloads 'topic'
[22:42:09] Inside: why do you need to lock?
[22:42:49] Inside: Could you hypothetically wrap everything in a transaction?
[22:42:59] Inside: instead of starting a new transaction inside your outer transaction?
[22:44:21] Inside: sounds rough
[22:44:47] Inside: oh, you're trying to order posts within a topic
[22:45:09] Inside: why not use a gem ._.
[22:45:37] Inside: to do your ordering
[22:46:16] Inside: From what I understand: you have a topic, a topic has a bunch of posts, you want to display the posts in order (their topic_position), and you want pagination
[22:46:59] Inside: what do you run?
[22:47:09] Inside: (if not a secret)
[22:47:57] Inside: you can create only one post with your topic, right?
[22:49:03] Inside: you could have a dummy model like 'InitialPost' without any nested attributes, then parse those attributes and manually create 1 of each associated object
[22:49:31] Inside: and then you could, on your topic class store a counter
[22:49:49] Inside: and then in your Post controller, look up the topic, read the counter, and then assign the topic_counter +=1
[22:50:35] Inside: erm, topic_position would be your topic counter+1, and then when you save you could update the topic_counter
[22:55:18] Inside: you don't like pagination gem? :P
[22:55:38] Inside: (will_paginate)
[22:56:03] Inside: such is life :)
[22:56:20] Inside: well, you know more than me
[22:56:23] Inside: so I can't be of any help
[22:58:15] Inside: I never said to do a created_at sort
[22:59:16] Inside: they do pagination based off whatever your ordering statement is
[23:04:51] Inside: (I'm not against using a topic_position column on Post at all, FYI)
[23:10:49] Inside: you're right, I think two where statements is probably more efficient than an order+offset+limit
[23:13:21] Inside: anyway, off to home


[16:10:06] Inside: has joined #RubyOnRails


[01:40:31] Inside: Disconnected by services


[16:25:44] Inside: has joined #ruby
[16:25:51] Inside: Can I complain to y'all about python?
[16:25:56] Inside: I do miss the block syntax of ruby :(
[16:30:52] Inside: I'm using python because it definitely has better graphing/ui/data analysis stuff, but am posting results to a RoR server
[16:31:10] Inside: can you paste the rake test?
[16:31:38] Inside: you probably need to be doing task task_name: :environment do {...}
[16:32:49] Inside: I'm using pyside2 (qt5)... ruby has bindings for some ancient version of qt4


[22:57:48] Inside: single controller with a service object
[23:03:47] Inside: are you doing different stuff depending on the type of the model?
[23:04:47] Inside: I mean it's hard to figure out what to do based on limited info, but I personally like service objects/poros for that kind of stuff
[23:06:34] Inside: yeah why not?
[23:07:08] Inside: but you've only got one resource
[23:08:49] Inside: I think you may be doing more advanced things than I'm used to :)
[23:09:07] Inside: but, in the name of the Matz, DHH, and the holy MRI, I grant you permission to use a service object
[23:10:57] Inside: I've not heard that before
[23:11:39] Inside: typically I use a model to control validation/before/after callbacks
[23:12:06] Inside: if I need to do something special (like calculate some values) - I'll pass stuff from the controller to a service object which will calculate that stuff and then create/update the model
[23:12:50] Inside: but, I'm sure there's a dozen opinions based on that


[16:51:13] Inside: ugh - a bunch of my tests require that my test database is setup with a certain state
[16:53:04] Inside: well, I have a number of rake tests that copy data over from production into the test database -_-


[14:26:43] Inside: has joined #RubyOnRails


[03:06:10] Inside: Disconnected by services


[00:36:10] Inside: Disconnected by services
[21:58:35] Inside: has joined #RubyOnRails
[22:04:15] Inside: I'm fond of react in certain instances
[22:04:24] Inside: like I made a work instruction editor that you can add pictures to, etc


[16:38:16] Inside: I don't know
[16:38:28] Inside: wrkrcoop: what does your validation look like?
[16:38:53] Inside: failed validations "should" just do errors.add(:attribute, error)
[16:39:18] Inside: is validated_associated throwing an error?
[16:41:01] Inside: wrkrcoop: can you show some code, etc
[16:42:41] Inside: wrkrcoop: I guess I don't understand what your issue is here either
[16:43:10] Inside: but, like Render.find(params[:renderer_id]) will throw an exception - you don't have to catch it
[16:43:41] Inside: duleja: ah, specific exception?
[16:43:49] Inside: with like an error code, etc?
[16:44:18] Inside: could you perhaps just do params[:renderer_id])
[16:44:32] Inside: and then your snapshot would fail to validate and then you can return the internal errors?
[16:45:08] Inside: wrkrcoop: yeah json APIs are also a thing i struggle with too
[16:45:19] Inside: in as far as I want to use rails' internal mechanism for passing messages, etc
[16:46:14] Inside:
[16:46:43] Inside: here's a concern that I found to help keep json responses standard throughout
[16:47:51] Inside: we're not
[16:47:56] Inside: that's limited to Matz
[16:49:28] Inside: I'm not the person you spoke to yesterday
[16:49:35] Inside: I'm not a hacker, I'm a middling code monkey
[16:49:58] Inside: I'm not the other guy you spoke to
[16:50:31] Inside: well you are coming across really angry
[16:50:39] Inside: combative, even
[16:51:50] Inside: I do not know the answer, sorry
[16:56:00] Inside: mjacob: Model.where("foo = ? AND bar NOT IN ?", 5, [1,2,3])
[16:57:09] Inside: (i'm not MrCrackPot )
[17:00:40] Inside: wrkrcoop: eh, I just use byebug for this reason. it seems to just work
[17:05:02] Inside: I don't even understand duleja's basic premise of a question at this point
[17:05:33] Inside: and my answer is - it depends on what you want to do with it
[17:16:51] Inside: here's a rails question
[17:17:24] Inside: I have a sql column with a 'time' type. Is there a way to post to a model without breaking up the constituent parts into YY/MM/DD, etc
[17:17:53] Inside: SQL Server
[17:18:09] Inside: I'm actually trying to post from a Python script, hehe
[17:19:16] Inside: looks I just need to post in the format "H:M:S.sss)
[17:22:04] Inside: and now the least fun part of this project, generating a bunch of charts and graphs
[22:25:13] Inside: Vaevictus:
[22:25:17] Inside: I think that's what you may be looking for
[22:26:09] Inside: or maybe this
[22:59:39] Inside: there's probably an SES-specific gem
[22:59:47] Inside: or are you trying to use activemailer?
[23:32:47] Inside: looks promising
[23:33:10] Inside: I have like a 90kb file representing some data that I want graphed
[23:33:45] Inside: do I.... want to hide the data within like a... hidden tag so that google's graphing API can read it
[23:33:57] Inside: or should I setup a controller, etc, where it get can be fetched using json
[23:51:27] Inside: interesting
[23:51:36] Inside: javascript and rails have different split behaviors on strings >:|
[23:52:47] Inside: "foo\r\n".split("\r\n") gives ["foo",""] in JS and ["foo"] in ruby
[23:53:01] Inside: the first is actually what I would expect
[23:53:45] Inside: reasonable minds can disagree
[23:53:50] Inside: and apparently they did :| :|
[23:54:17] Inside: in python the same code gives ["foo", ""] as well
[23:54:23] Inside: ACTION tears hair out
[23:54:56] Inside: I've got a python program logging data, submitting it to a rails server, and then I want to use google's chart api to show stuff
[23:55:16] Inside: I don't even know what language I'm writing anymore