Velizar

Activity Graph

Page 1 of 1

2017-04-29

[10:28:24] Velizar: Quit: Velizar
[10:50:51] Velizar: has joined #RubyOnRails
[11:03:34] Velizar: Ping timeout: 245 seconds
[11:56:04] Velizar: has joined #RubyOnRails
[12:06:29] Velizar: Quit: Velizar
[12:07:29] Velizar: has joined #RubyOnRails
[12:07:30] Velizar: Client Quit

2017-04-28

[10:02:43] Velizar: has joined #RubyOnRails
[10:04:03] Velizar: Is it possible to have nested layouts - have layout B inside application.html.erb, and have my content inside layout B - without modifying application.html.erb? Or do I need a gem for that
[10:05:49] Velizar: I really don't want to couple application.html.erb to the layout inheriting from it, it should be the other way around.
[10:11:34] Velizar: actually I can't even find a gem to do that which works with Rails 5+
[10:24:38] Velizar: Solved it: https://mattbrictson.com/easier-nested-layouts-in-rails

2017-04-18

[16:16:13] Velizar: has joined #RubyOnRails
[16:37:32] Velizar: Quit: Konversation terminated!

2017-04-04

[08:28:00] Velizar: Quit: Velizar
[08:28:25] Velizar: has joined #RubyOnRails
[08:28:48] Velizar: Client Quit

2017-04-03

[14:48:08] Velizar: Ping timeout: 240 seconds
[17:07:07] Velizar: has joined #RubyOnRails

2017-04-02

[05:01:45] Velizar: gvpmahesh 1. it should be independently generated because otherwise an attacker learn know some of that information it's based on and use it to infer the auth token; you could authenticate with the (id, token) pair for easier DB query, but it's simpler if you don't assume that the id is secret. 2. I think it doesn't need to be changed. 3. Like one of the answers said - don't forget to hash the token on the server DB
[05:03:04] Velizar: but other than that, if the connection is encrypted, you should be fine

2017-04-01

[07:01:45] Velizar: has joined #RubyOnRails
[07:05:38] Velizar: Somehow some of my counter_cache columns ended up with value of nil in my development DB (which causes an exception every time I try to read the count they're caching). Any ideas how this happens? I'm worried this might happen in production.

2017-03-29

[11:57:30] Velizar: has joined #RubyOnRails
[11:58:05] Velizar: pg gem doesn't offer changes. Any experience with version 0.20? Should I expect difficulties?
[11:58:29] Velizar: I only interact with the DB via Rails, and not directly.
[13:44:27] Velizar: Quit: Velizar

2017-03-27

[02:04:18] Velizar: has joined #RubyOnRails
[02:05:49] Velizar: One of my controllers takes a string parameter like so: params.require(:reply); but the parameter is sometimes an empty string (like so: `GET url/path?reply=`), and this causes require to raise an exception. Is there a require which allows empty strings?
[02:06:00] Velizar: I still want to raise an exception if the parameter is missing.
[02:08:50] Velizar: okay got it
[02:15:04] Velizar: ACTION used `raise ActionController::ParameterMissing, 'reply' unless params.include?('reply')` and `reply = params[:reply]`
[05:58:47] Velizar: Quit: Velizar
[23:09:43] Velizar: has joined #RubyOnRails
[23:53:10] Velizar: Quit: Velizar

2016-08-01

[00:14:47] Velizar: Quit: Velizar

2016-07-31

[06:37:54] Velizar: Quit: Velizar
[10:44:00] Velizar: has joined #RubyOnRails
[10:44:47] Velizar: Client Quit
[12:00:58] Velizar: has joined #RubyOnRails
[12:28:07] Velizar: Ping timeout: 252 seconds
[12:29:30] Velizar: has joined #RubyOnRails

2016-07-30

[01:16:52] Velizar: Quit: Velizar
[01:29:49] Velizar: has joined #RubyOnRails
[01:51:57] Velizar: Quit: Velizar
[12:24:29] Velizar: has joined #RubyOnRails
[12:29:23] Velizar: Ping timeout: 250 seconds
[12:29:39] Velizar: has joined #RubyOnRails
[15:29:04] Velizar: Quit: Velizar
[16:28:51] Velizar: has joined #RubyOnRails
[17:47:18] Velizar: has joined #ruby
[17:48:00] Velizar: Is there a better way to write lines 4-6? https://gist.github.com/VelizarHristov/2785c4e15c11db1dcd0a4f0a4b95a4ee
[17:48:11] Velizar: I feel like there might be a method which does that for me
[17:48:54] Velizar: like assert(), but assert is not for production really
[18:08:18] Velizar: has left #ruby: ()

2016-07-29

[00:03:56] Velizar: Quit: Velizar
[08:35:34] Velizar: has joined #RubyOnRails
[08:39:25] Velizar: Client Quit
[13:19:27] Velizar: has joined #RubyOnRails

2016-07-28

[02:43:54] Velizar: Quit: Velizar
[11:03:42] Velizar: has joined #RubyOnRails

2016-07-27

[00:22:05] Velizar: has joined #RubyOnRails
[01:28:42] Velizar: Quit: Velizar
[12:39:25] Velizar: has joined #RubyOnRails
[14:53:23] Velizar: How can I make this code work? Trip.find(params[:id]).includes(trip_items: :visit_constraints)
[14:53:36] Velizar: It complains because .includes is not a method on a single object
[14:54:47] Velizar: I could use where(id: params[:id]).includes(..).first, but that's not ideal because it returns nil instead of error if there the record is not found
[14:58:13] Velizar: I fixed it
[15:25:12] Velizar: Is it possible to update multiple fields at the same time with just one query, rather than n queries? I don't get it why Model.update(records.keys, records.values) generates n queries.
[15:38:42] Velizar: This is what it should generate: http://stackoverflow.com/a/2528188/1466212 [on a side note, why is SQL so damn redundant? ugh]
[15:38:56] Velizar: except with one column only

2016-07-26

[04:03:41] Velizar: Quit: Velizar
[09:27:14] Velizar: has joined #RubyOnRails
[12:23:58] Velizar: Ping timeout: 244 seconds
[23:53:23] Velizar: Quit: Velizar

2016-07-25

[01:26:31] Velizar: Quit: Velizar
[01:52:41] Velizar: has joined #RubyOnRails
[05:34:09] Velizar: Quit: Velizar
[07:35:02] Velizar: has joined #RubyOnRails
[10:21:09] Velizar: Quit: Velizar
[15:32:17] Velizar: has joined #RubyOnRails

2016-07-24

[02:11:39] Velizar: Quit: Velizar
[14:31:36] Velizar: has joined #RubyOnRails

2016-07-23

[03:18:03] Velizar: Quit: Velizar
[11:16:09] Velizar: has joined #RubyOnRails
[16:58:48] Velizar: Quit: Velizar
[18:39:01] Velizar: has joined #RubyOnRails

2016-07-22

[05:30:05] Velizar: Quit: Velizar
[10:50:52] Velizar: has joined #RubyOnRails

2016-07-21

[10:46:19] Velizar: has joined #RubyOnRails
[10:50:39] Velizar: Client Quit
[14:56:44] Velizar: has joined #RubyOnRails
[17:29:56] Velizar: Is there a way to re-render the current form and keep the URL of the form for JS purposes?
[17:30:55] Velizar: since my JS has URL-specific .ready() code, and my pages with forms have JS validation

2016-07-20

[05:07:11] Velizar: has joined #RubyOnRails
[11:36:19] Velizar: Quit: Velizar
[12:03:48] Velizar: has joined #RubyOnRails
[18:56:49] Velizar: Quit: Velizar

2016-07-19

[00:21:16] Velizar: has joined #RubyOnRails
[00:46:38] Velizar: Is it possible to have multiple forms of the same model at the same page? Because the ids of the input fields are repeating: each Trip's form has an input with id='trip_completed'.
[00:47:45] Velizar: actually I think I just found a solution
[04:03:19] Velizar: Quit: Velizar
[15:04:31] Velizar: has joined #RubyOnRails
[23:34:43] Velizar: Quit: Velizar

2016-07-18

[00:29:34] Velizar: Quit: Velizar

2016-07-17

[09:54:57] Velizar: has joined #RubyOnRails
[09:59:04] Velizar: Updating Capybara to 2.7.0 broke some of my tests using find(:css, string) - I get Capybara::ElementNotFound. But there is nothing about that mentioned in the changelog. What is going on?
[10:03:06] Velizar: I looked at the changelog, _find_ itself is not changed; it must be something it uses.
[10:16:11] Velizar: arup_r: I used _puts page.body_, and I could find the css manually
[10:16:19] Velizar: but the find method failed anyway
[10:17:37] Velizar: arup_r: still failure
[10:18:52] Velizar: the method call is find(:css, "#something"); the HTML is <input id="something"> ... </input>, it has lots of other attributes in addition to the id
[10:19:09] Velizar: ok I'll gist the spec, the HTML and the errors I get
[10:21:04] Velizar: I don't think so
[10:21:28] Velizar: btw I tested many times going back to capybara 2.6.2 and then 2.7.1 and it always fails if it's 2.7.1 and doesn't if 2.6.2
[10:21:40] Velizar: tested at least 4-5 times with each
[10:23:19] Velizar: hope I'm not forgetting something https://gist.github.com/VelizarHristov/061a3f02098f0068d25258fcf831b1b9
[10:23:50] Velizar: btw it fails the same way if I remove the .set
[10:25:14] Velizar: arup_r: Start from the second file - it gives the line numbers: they are 243 and 199
[10:25:20] Velizar: at the end of it
[10:25:32] Velizar: also the HTML starts at line 14 of the second file
[10:27:05] Velizar: neat! gist is very well designed
[10:30:07] Velizar: huh I didn't intend that
[10:31:14] Velizar: arup_r: it's different: _count vs _discount
[10:31:25] Velizar: but let me know if you find any duplicate ids
[10:32:25] Velizar: I'm considering downgrading to 2.6.2 and waiting until more documentation is available or maybe I'm just experiencing a bug which they'll fix
[10:36:01] Velizar: arup_r: I believe it had a potentially duplicate label, because it allows the editing of multiple items at the same time, so it's called Count for each
[10:36:10] Velizar: does fill_in take CSS?
[10:36:41] Velizar: I think it only takes a label name, so with duplicates I can do nothing
[10:39:52] Velizar: it must be something they changed. that was all working with 2.6.2
[10:41:19] Velizar: wait_time didn't fix it, I'll try fill_in
[10:44:03] Velizar: I get the same thing with fill_in 'the_id', with: val
[10:44:14] Velizar: yeah I'll do that
[10:50:23] Velizar: that's strange: everything is green with 2.6.2, but if I change it to fill_in('ironing_booking_services_attributes_0_count', with: ironing_svc_hours.to_s), it can't find it
[10:50:30] Velizar: fill_in is supposed to be able to find an id
[10:50:50] Velizar: and I checked for typos
[11:20:04] Velizar: My project is using two gems which depend on rails < 5 and are last updated 2-3 years ago; I want to update to Rails 5. Also I can't remove one of the gems without a major rewrite. So basically I'm screwed?
[11:21:01] Velizar: the problematic gem is iced-rails, I'm using IcedCoffeeScript
[16:23:36] Velizar: Quit: Velizar
[18:43:04] Velizar: has joined #RubyOnRails

2016-07-14

[05:23:41] Velizar: has joined #RubyOnRails
[08:31:56] Velizar: Ping timeout: 272 seconds
[09:08:08] Velizar: has joined #RubyOnRails
[09:33:35] Velizar: has left #RubyOnRails: ()

2016-07-13

[17:55:36] Velizar: has joined #RubyOnRails
[23:37:40] Velizar: Quit: Velizar

2016-07-12

[00:34:00] Velizar: has joined #RubyOnRails
[01:14:54] Velizar: Quit: Velizar
[20:16:30] Velizar: has joined #RubyOnRails
[20:38:23] Velizar: Quit: Velizar

2016-07-11

[06:40:51] Velizar: Ping timeout: 276 seconds
[12:13:58] Velizar: has joined #RubyOnRails
[13:14:42] Velizar: RubyMine gives a warning for using more than two instance variables in a view. But then how am I supposed to make a view which needs to display more than 2 things which come from a model?
[13:19:59] Velizar: for example, I have a view which prints: 1) date of the route, 2) the list of customers visited, 3) an array of DriverLocation-s into a map to see the path the driver took, 4) the full matrix of AddressDistance-s from every address to every other, used in JS to calculate the estimated time of visit for each customer when you rearrange 2.
[13:21:51] Velizar: oh, also 5) information about the Route such as who is the driver and whether it's completed yet or not; note that the 5 things I said are of 5 different classes
[19:42:36] Velizar: Quit: Velizar

2016-07-10

[00:12:06] Velizar: Quit: Velizar
[15:54:43] Velizar: has joined #RubyOnRails
[15:57:37] Velizar: Client Quit
[19:17:18] Velizar: has joined #RubyOnRails

2016-07-09

[15:33:40] Velizar: has joined #RubyOnRails

2016-07-08

[00:01:36] Velizar: Quit: Velizar

2016-07-07

[10:53:38] Velizar: has joined #RubyOnRails
[12:27:00] Velizar: Quit: Velizar
[18:01:00] Velizar: has joined #RubyOnRails
[22:24:36] Velizar: Quit: Velizar
[23:05:41] Velizar: has joined #RubyOnRails

2016-07-06

[06:43:00] Velizar: has joined #RubyOnRails
[06:43:10] Velizar: Client Quit
[18:39:43] Velizar: has joined #RubyOnRails
[22:02:37] Velizar: Quit: Velizar

2016-07-05

[01:13:01] Velizar: Quit: Velizar
[11:40:31] Velizar: has joined #RubyOnRails
[23:11:59] Velizar: Quit: Velizar

2016-07-04

[09:22:50] Velizar: has joined #RubyOnRails
[20:22:12] Velizar: Ping timeout: 258 seconds
[20:27:17] Velizar: has joined #RubyOnRails

2016-07-03

[09:17:55] Velizar: has joined #RubyOnRails
[09:19:12] Velizar: If I'm rendering a partial, how can I give it a bit of extra HTML for it to insert at the appropriate place? Also I don't want that HTML to be as a string if possible because that messes up syntax highlighting.
[09:24:49] Velizar: ah, content_for looks like what I need
[19:42:09] Velizar: Quit: Velizar

2016-07-01

[07:55:11] Velizar: has joined #RubyOnRails
[09:08:30] Velizar: How can I put bootstrap glyphicons to a submit button without hardcoding the submit button text? Since it's either Update or Create, depending on what it's rendered for.
[20:04:31] Velizar: Quit: Velizar
[21:10:19] Velizar: Client Quit
[21:10:19] Velizar: has joined #RubyOnRails

2016-06-30

[08:39:15] Velizar: has joined #RubyOnRails
[08:40:40] Velizar: I'm adding icons to my links, which are with Bootstrap and look like buttons. What is a good icon for the _show_ link? Preferably from Bootstrap's glyphicons icon set.
[21:28:42] Velizar: Quit: Velizar

2016-05-24

[14:23:53] Velizar: has joined #ruby
[14:25:19] Velizar: RubyMine 2016.1 is the latest stable version, right? Why does my RubyMine stay at 8.0.4? I'm on OS X.
[14:27:22] Velizar: yeah it doesn't, and I don't know why. Guess I'll do that then
[14:27:43] Velizar: 8.0.4 annoyingly flags the &. operator as an error
[14:28:02] Velizar: OS X, latest
[14:29:29] Velizar: huh, it asks again for the license on my Arch Linux OS. Nevermind then
[14:29:37] Velizar: guess I'll just do that
[14:29:57] Velizar: yeah I know
[14:30:04] Velizar: I meant I'll re-enter the license
[14:43:30] Velizar: has joined #RubyOnRails
[14:50:16] Velizar: Read error: Connection reset by peer
[14:50:35] Velizar: has joined #RubyOnRails
[14:50:35] Velizar: has joined #ruby
[15:01:12] Velizar: I'm thinking of abstracting a few features of my app as Rails engines to release as open-source, and then expand both the app and those engines when necessary. Is this a good idea? I've never made any Rails engines before and am worried it might not work as I imagine it.
[15:04:28] Velizar: tubbo: I'm only using one instance of everything, but I want to make it available for others to use it.
[15:07:41] Velizar: tubbo: so it's a better idea to first finish my product, and then refactor into engines, rather than start with partway-done engines on a partway-done product?
[15:47:53] Velizar: has left #ruby: ()
[19:07:57] Velizar: Quit: Velizar
[19:08:27] Velizar: Client Quit
[19:08:27] Velizar: has joined #RubyOnRails