iwmrby

Activity Graph

Page 1 of 1

2017-03-13

[11:56:10] iwmrby: has joined #ruby
[15:45:34] iwmrby: Quit: WeeChat 1.7

2016-07-16

[09:53:01] iwmrby: has joined #ruby
[10:20:35] iwmrby: Quit: WeeChat 1.5

2016-06-22

[11:50:00] iwmrby: has joined #ruby
[12:27:28] iwmrby: Quit: WeeChat 1.5

2016-05-22

[15:11:27] iwmrby: has joined #ruby
[15:13:09] iwmrby: Hey. So, I am creating a model for something and I want to have a Unix timestamp in the X field. I should use x:time, right?
[15:13:44] iwmrby: Oh, shit. Sorry.
[15:13:52] iwmrby: has joined #RubyOnRails
[15:15:11] iwmrby: ellistaa: yes, .to_i converts to Unix timestamp. But I'm not sure I can use that in model declarations.
[15:15:32] iwmrby: So, I am creating a model for something and I want to have a Unix timestamp in the X field. I should use x:time, right?
[15:18:14] iwmrby: ellistaa: Yup. "rails generate model blah X:type", where type is in {:string, :text, :integer, :float, :decimal, :datetime, :timestamp, :time, :date, :binary, :boolean}
[15:19:56] iwmrby: I think it's timestamp, but I thought I should ask somebody first.
[15:20:02] iwmrby: eh, I'll figure it out
[15:29:37] iwmrby: jhass: Thanks!
[15:48:46] iwmrby: Quit: WeeChat 1.5
[16:10:20] iwmrby: has joined #ruby
[19:00:20] iwmrby: Quit: WeeChat 1.5

2016-05-12

[14:41:17] iwmrby: has joined #ruby
[16:50:36] iwmrby: Quit: WeeChat 1.4
[20:20:35] iwmrby: has joined #ruby
[20:21:25] iwmrby: People, I need help.
[20:22:38] iwmrby: Say I have a Ruby script and I get to a line that looks like Thread.new { do stuff in the new, separate thread }; more stuff; sleep 10.minutes;
[20:23:36] iwmrby: When I run sleep, does it also sleep the Thread? Is this the intended behaviour?
[20:24:05] iwmrby: AAAAH, but it seem to do that.
[20:24:09] iwmrby: Ok, back to debugging
[20:24:45] iwmrby: s/seem/seems
[20:27:33] iwmrby: Well, One more question. Say I have script one.rb and I want to call script two.rb with arguments U and Y as in `two.rb U Y`. What's the best way to call two.rb in a separate process? Thread.new{ system("ruby", "two.rb", Y, U) }
[20:28:27] iwmrby: So spawn and Process.detach. Why this?
[20:29:13] iwmrby: Well, since I don't care about it after it starts it comes naturally.
[20:29:39] iwmrby: it = the other script
[20:32:19] iwmrby: ruby595: I don't want to wait for it to end.
[20:33:56] iwmrby: jhass: I was so trying to avoid that, but it's probably what I am going to to.
[20:34:05] iwmrby: jhass: thanks a lot for your help!
[21:07:20] iwmrby: Quit: WeeChat 1.4

2016-05-08

[15:36:36] iwmrby: has joined #ruby
[19:01:02] iwmrby: Quit: WeeChat 1.4

2016-04-22

[16:04:52] iwmrby: has joined #ruby
[17:04:57] iwmrby: Quit: WeeChat 1.4

2016-04-14

[20:35:05] iwmrby: has joined #ruby
[20:37:36] iwmrby: Client Quit

2016-03-24

[14:34:37] iwmrby: has joined #ruby
[16:46:30] iwmrby: Quit: WeeChat 1.4

2016-03-17

[18:24:48] iwmrby: has joined #ruby
[20:45:54] iwmrby: Quit: WeeChat 1.4

2016-03-12

[17:06:52] iwmrby: has joined #ruby
[17:50:07] iwmrby: Quit: WeeChat 1.4

2016-03-05

[10:28:55] iwmrby: has joined #ruby
[18:37:34] iwmrby: Quit: WeeChat 1.4

2015-12-09

[08:45:08] iwmrby: has joined #ruby
[08:51:27] iwmrby: Hi. One small question. Newbie trying to create a blog app in Ruby. I have articles and comments. I am working on the controller for comments: when a new comment is created and saved I want to redirect back to the article with the id from params. Can I do that by doing redirect to /articles/#{params[:article_id]}? All the examples I find online are for more complicated things.
[08:58:34] iwmrby: I can do that?!
[08:58:45] iwmrby: Yes, I can because I have index defined for article.
[08:59:02] iwmrby: Ah, I kind of love Ruby.
[08:59:07] iwmrby: Thank you a lot!
[09:35:31] iwmrby: did not know that. Thanks and apologies!
[09:35:36] iwmrby: has joined #RubyOnRails
[09:57:06] iwmrby: Ping timeout: 240 seconds
[11:06:32] iwmrby: has joined #ruby
[11:06:34] iwmrby: has joined #RubyOnRails
[11:10:18] iwmrby: Client Quit
[15:03:12] iwmrby: has joined #ruby
[15:24:50] iwmrby: Ping timeout: 256 seconds