Activity Graph

Page 1 of 1


[17:56:32] Vegetable: *.net *.split


[00:07:17] Vegetable: *.net *.split
[00:15:29] Vegetable: has joined #RubyOnRails


[02:47:06] Vegetable: *.net *.split
[02:47:49] Vegetable: has joined #RubyOnRails


[12:25:44] Vegetable: *.net *.split
[12:27:32] Vegetable: has joined #RubyOnRails
[15:01:14] Vegetable: *.net *.split
[15:03:06] Vegetable: has joined #RubyOnRails


[15:01:18] Vegetable: has joined #RubyOnRails
[15:28:01] Vegetable: some databases have within() functions that support dates


[22:11:00] Vegetable: for the route helpers, eg whatever_path, is there a way to append parameters to that url
[22:11:09] Vegetable: in a link_to
[22:14:48] Vegetable: cool, that worked, also for example if it was a link_to new_whatever_path is there any automatic prefill, or would I have to add that in the controller
[22:15:50] Vegetable: prefill a form value
[22:15:56] Vegetable: but I guess that's just wishful thinking
[22:18:28] Vegetable: using simple_form_for
[23:56:43] Vegetable: when you call a function, eg foo bar: baz, what would you call bar?
[23:57:57] Vegetable: well I mean more specifically bar: as it relates to baz
[23:58:03] Vegetable: a key of some sort
[23:58:11] Vegetable: but it's not a hash I think
[23:58:40] Vegetable: so it is a hash?
[23:59:10] Vegetable: aight, thanks


[18:57:49] Vegetable: hi, in an active model serializer, is there any way to apply an order or sort to the model being returned?
[19:04:40] Vegetable: rather the results of the call on that model
[19:04:45] Vegetable: by default it sorts by id
[19:05:27] Vegetable: like if I wanted to serialize users and order them by name instead of id
[19:06:36] Vegetable: all I can find is sorting based on associations
[19:14:57] Vegetable: well shouldn't the sort order be part of the serializer itself
[19:15:34] Vegetable: well I can't find where it's being called otherwise
[19:20:18] Vegetable: undefined method `order' for EventSerializer:Class
[19:21:28] Vegetable: I can't find the query


[14:56:30] Vegetable: any way to make 'One' => 1?
[14:57:58] Vegetable: not worth it, it's just "One" and "Two"
[14:58:02] Vegetable: will hard code
[15:08:34] Vegetable: another quick string question, if I want to access an object parameter using a string, have to use .to_param right?
[15:10:32] Vegetable: like if I had "id" and wanted to get from "id"
[15:12:18] Vegetable: if var was a model...
[15:13:28] Vegetable: here you go epochwolf
[15:15:38] Vegetable: not compare, make those two things return the same thing
[15:15:44] Vegetable: I don't know how telse to explain it
[15:17:14] Vegetable: ok what I was looking for was user.send("id".to_sym)
[15:18:01] Vegetable: it won't be
[15:19:40] Vegetable: ok I guess this still isn't what I want
[15:19:44] Vegetable: cause I can't do assignments
[15:22:15] Vegetable: guess I'll just write each one out manually


[14:08:25] Vegetable: hi, how can I easily define an application wide constant? I can't seem to find a conclusive answer
[14:32:03] Vegetable: how can I define an application constant? if I put it in application.rb or initializers/foo.rb I get an undefined
[14:34:27] Vegetable: wpp: application.rb > CONSTANT = 5
[14:35:01] Vegetable: uninitialized constant ActionView::CompiledTemplates::CONSTANT
[14:38:20] Vegetable: I have restarted, not working...
[14:41:49] Vegetable: nvm, working now, no idea what changed
[14:42:20] Vegetable: I restarted it several times before
[14:43:14] Vegetable: wpp:


[01:56:03] Vegetable: so I want to create a custom rails command line command, possibly to the seed file, where's the easiest place to do this?