anoob

Activity Graph

Page 1 of 1

2019-05-09

[18:59:27] anoob: has joined #ruby
[19:01:51] anoob: Is it possible to unlock a sidekiq unique job only if it goes to the "dead queue"? My jobs are unlocked when they fail and I need them to retry ...
[20:09:51] anoob: Ping timeout: 256 seconds

2019-03-06

[16:31:45] anoob: has joined #RubyOnRails
[16:33:31] anoob: How do I mock a Numeric|Integer (not sure which class) method?: `allow_any_instance_of(Numeric).to receive(:day) { :somehting }` ... When I call `1.day` I receive: `TypeError: can't define singleton` ...
[20:55:19] anoob: Quit: Page closed

2018-10-19

[18:28:45] anoob: has joined #ruby
[18:28:51] anoob: has joined #RubyOnRails
[18:29:41] anoob: Is it possible to read an ENV var within a .env file: `DATABASE_URL=postgres://username:passwd@localhost:5432/db_name<%= ENV['TEST_ENV_NUMBER'] %>` ?
[18:30:43] anoob: Is it possible to read an ENV var within a .env file: `DATABASE_URL=postgres://username:passwd@localhost:5432/db_name<%= ENV['TEST_ENV_NUMBER'] %>` ?
[18:34:13] anoob: No problem, phaul
[18:37:24] anoob: I receive an error: "URI::InvalidURIError: bad URI(is not URI?)" with the `<%= ENV['TEST_ENV_NUMBER'] %>` part ...
[18:37:28] anoob: But it does work without it ...
[19:29:25] anoob: Ping timeout: 256 seconds

2018-05-18

[21:42:27] anoob: has joined #RubyOnRails
[21:43:36] anoob: Is it possible to get all environments in a rails application?
[21:44:18] anoob: this is my approach but i don't like it: http://www.pqn.pw/16
[21:55:40] anoob: great! mlt- ! "Rails.configuration.database_configuration.keys - ['default']"
[22:02:40] anoob: Ping timeout: 260 seconds

2018-05-12

[00:52:29] anoob: has joined #RubyOnRails
[00:54:33] anoob: I have this route: `get '/:id', to: 'foo#bar', constraints: { id: /\d+/ }` and it works great. except for /404 and /500 (static error pages) for example. how can i handle it? if there is a record with id 404 i want to display the record, else, i want to display the 404 static page ...
[01:21:27] anoob: Quit: Page closed
[13:22:55] anoob: has joined #RubyOnRails
[14:01:47] anoob: I'm not sure how to handle this problem with my dynamic routes clashing with rails static pages (/404, /500 ...): https://stackoverflow.com/q/50302027/1906809
[14:39:00] anoob: Ping timeout: 260 seconds

2018-03-26

[23:22:37] anoob: has joined #RubyOnRails
[23:23:18] anoob: is it possible to render something within rescue_from and stop the execution?
[23:27:29] anoob: this is what i've tried so far: https://pastebin.mozilla.org/9080961
[23:30:16] anoob: what's wrong with and/or?
[23:30:29] anoob: something is raising it but it does not work at all
[23:32:53] anoob: lupine: https://pastebin.mozilla.org/9080962
[23:33:20] anoob: and then i'm visiting http://localhost:3000/jobs/1-rails-dev which is the wrong url
[23:33:26] anoob: it should be http://localhost:3000/jobs/1-rails-developer
[23:33:37] anoob: the exception is really raised
[23:33:49] anoob: i've echoed before the exception is raised ...
[23:37:00] anoob: it does not stop the execution: https://pastebin.mozilla.org/9080963
[23:42:36] anoob: lupine: https://pastebin.mozilla.org/9080964
[23:46:53] anoob: Quit: Page closed

2016-05-14

[22:12:02] anoob: has joined #RubyOnRails
[22:12:22] anoob: is it possible to disable asset pipeline in an existing app?
[22:12:31] anoob: rails 5 app *
[22:16:22] anoob: fox_mulder_cp: https://pastebin.mozilla.org/8871399
[23:52:28] anoob: Quit: Page closed

2016-04-16

[12:59:20] anoob: has joined #RubyOnRails
[12:59:43] anoob: is it possible to use url_for inside my .js.coffee.erb files?
[13:35:30] anoob: Ping timeout: 250 seconds

2016-03-31

[00:14:08] anoob: has joined #RubyOnRails
[00:15:20] anoob: the "prompt: true" parameter for the "select_tag" method generates an option with "true" as text, is it normal? https://pastebin.mozilla.org/8865654
[00:16:43] anoob: "collection_select" seems to generate this text for me ...
[00:16:48] anoob: thanks Radar and Arcaire!
[00:20:37] anoob: Quit: Page closed

2016-03-25

[21:23:54] anoob: has joined #ruby
[21:28:34] anoob: Ping timeout: 250 seconds
[21:36:35] anoob: has joined #RubyOnRails
[21:37:31] anoob: Client Quit
[21:38:35] anoob: has joined #RubyOnRails
[21:56:25] anoob: what's the right callback to sanitize data for a model? for example, i don't want to save a phone like "+55 (47) 3373-0396" with non numeric characters ...
[21:57:09] anoob: i want to save just "554733730396"
[21:58:13] anoob: ah ... and the phone attribute has a validation ...
[22:15:48] anoob: Ping timeout: 250 seconds

2016-03-23

[00:24:00] anoob: Ox0dea, thanks
[01:04:51] anoob: Quit: Page closed

2016-03-22

[23:59:18] anoob: has joined #ruby
[23:59:28] anoob: is it possible to define private methods with define_method?

2015-12-21

[12:15:28] anoob: has joined #ruby
[12:16:41] anoob: has joined #RubyOnRails
[12:23:08] anoob: is it possible to uglify js in a development environment? config/environments/development.rb: https://pastebin.mozilla.org/8855016
[13:50:13] anoob: Quit: Page closed

2015-07-21

[13:21:48] anoob: has joined #RubyOnRails
[13:24:26] anoob: i am not able to run rails: http://pastebin.com/0cGz6m0Q
[13:24:56] anoob: sorry, http://pastie.org/10304280
[13:26:24] anoob: vedu, i am not sure what you mean, but i'm running debian testing armhf with ruby and rails packages ...
[13:27:07] anoob: vedu, yes, i am using rails from apt-get ...
[13:27:34] anoob: vedu, i will read it, thanks!
[13:27:48] anoob: vedu, it does work in another debian box
[13:29:16] anoob: vedu, i see ...
[14:51:22] anoob: Ping timeout: 246 seconds

2015-02-07

[21:09:02] anoob: i would like to permit full text searching active jobs (jobs.active = true) where the related company is also active (companies.active = true): http://pastie.org/9896266 ... The closest thing i've found was: http://stackoverflow.com/a/20912569/1906809
[21:09:21] anoob: But it's weird and ".result_ids" doesn't exist ...

2015-02-05

[23:12:43] anoob: I would like to full text search (sunspot solr) active jobs (:active = true) where companies are active too (:active = true): http://pastie.org/9890710 . A job belongs to a company ...

2015-01-31

[14:59:45] anoob: I set two fields (salt, password) on before_save but they are not included in the insert: http://pastebin.com/wB3Um17k
[14:59:49] anoob: what am i missing
[15:00:31] anoob: sorry, i'm new here: http://pastie.org/9876334
[15:03:52] anoob: freedrull with the rails generated code ... http://pastie.org/9876338
[15:04:51] anoob: it sounds bad, Denarii :)
[15:05:11] anoob: sorry about my silly mistakes ... i've just started to learn rails ...
[15:05:42] anoob: by save you mean insert/update, right Denarii?
[15:06:23] anoob: tweeeaks, actually i don't want to use a gem for this taask right now ... this is a project to learn ruby/rails ...
[15:06:34] anoob: Denarii, i see ...
[15:07:15] anoob: freedrull, an user belongs to a company. i'm generating a nested form with f.fields_for ...
[15:07:40] anoob: Denarii, how would you proceed in this case?
[15:10:08] anoob: of course Denarii
[15:10:49] anoob: Denarii, http://pastie.org/9876351
[15:11:18] anoob: it seems that before_create seems to be more appropriate in this case ... i'll give it a try :)
[15:15:03] anoob: Denarii, thanks! :D
[15:16:37] anoob: Denarii, good observation! I'm not a Ruby/Rails guy yet :)
[15:17:18] anoob: Denarii, I've read about it before ... i forgot it :)
[15:18:23] anoob: now, how could i see the insert from a has_one/belongs_to association in rails console ?
[15:20:00] anoob: Denarii, I'm just testing my methods ... writing some code, printing things ...
[15:20:43] anoob: but now, thinking about it, i can use the "rails console" :)
[15:28:52] anoob: Denarii, yes. rails guides are my support ...
[15:29:07] anoob: Denarii, Code academy too ...
[15:35:18] anoob: Denarii, why would you do that?
[15:36:57] anoob: Denarii, you're right! it's true!
[15:37:15] anoob: Rails is great but sometimes i fell magic in it
[15:42:07] anoob: Without "BCrypt::Password.create" the method valid_credentials? returns true http://pastie.org/9876396 ... Does it use random or something like that?
[15:52:04] anoob: Denarii, generate_hash, hash_secret seems to fix my issue :)
[15:52:32] anoob: now i can remove the 'securerandom' include :)

2013-06-23

[21:33:52] anoob: i will parse a long string... how should i test without getting my tests dirties with long strings?
[21:35:46] anoob: MrZYX, thanks. Are there any resource talking about this practice?
[21:37:11] anoob: no problem, thank you very much MrZYX