fertapric

Activity Graph

Page 1 of 1

2019-09-11

[03:43:56] fertapric: Ping timeout: 252 seconds
[03:45:41] fertapric: has joined #elixir-lang

2019-08-22

[00:56:30] fertapric: *.net *.split
[01:14:06] fertapric: has joined #elixir-lang

2019-06-24

[00:51:10] fertapric: Read error: Connection reset by peer
[00:51:22] fertapric: has joined #elixir-lang

2019-06-03

[07:42:06] fertapric: *.net *.split
[07:53:27] fertapric: has joined #elixir-lang
[12:46:19] fertapric: Ping timeout: 248 seconds
[12:46:34] fertapric: has joined #elixir-lang

2019-05-24

[08:05:20] fertapric: Ping timeout: 252 seconds
[08:05:38] fertapric: has joined #elixir-lang

2019-05-20

[06:47:15] fertapric: Read error: Connection reset by peer
[06:47:30] fertapric: has joined #elixir-lang

2019-04-30

[15:24:01] fertapric: tristan__: maybe the `:env` key is what you are looking for? https://hexdocs.pm/mix/Mix.Tasks.Compile.App.html

2019-04-13

[16:49:52] fertapric: *.net *.split

2016-02-29

[20:23:44] fertapric: has joined #RubyOnRails
[20:23:44] fertapric: has joined #ruby
[21:28:42] fertapric: Quit: Textual IRC Client: www.textualapp.com
[21:40:36] fertapric: has joined #RubyOnRails
[21:40:36] fertapric: has joined #ruby
[21:41:14] fertapric: Client Quit
[21:51:41] fertapric: has joined #RubyOnRails
[21:51:41] fertapric: has joined #ruby
[22:14:36] fertapric: Quit: Textual IRC Client: www.textualapp.com

2016-01-12

[21:17:26] fertapric: has joined #ruby
[21:17:27] fertapric: has joined #RubyOnRails
[21:25:56] fertapric: Quit: Textual IRC Client: www.textualapp.com

2015-09-22

[15:20:06] fertapric: has joined #RubyOnRails
[15:20:06] fertapric: has joined #ruby
[15:20:44] fertapric: Remote host closed the connection

2015-09-10

[09:29:17] fertapric: has joined #RubyOnRails
[09:29:17] fertapric: has joined #ruby
[10:00:14] fertapric: Quit: Textual IRC Client: www.textualapp.com

2015-06-13

[13:30:54] fertapric: has joined #RubyOnRails
[13:30:54] fertapric: has joined #ruby
[14:05:02] fertapric: Quit: Textual IRC Client: www.textualapp.com
[14:09:42] fertapric: has joined #ruby
[14:09:43] fertapric: has joined #RubyOnRails
[14:20:51] fertapric: Quit: Textual IRC Client: www.textualapp.com

2014-12-09

[11:53:47] fertapric: I'm trying to pass some variable to a data attribute, but I'm having some issues trying to sanitize it
[11:54:49] fertapric: imagine <div data-title="<%= title %>"> being title: foo "bar"
[11:55:18] fertapric: I'm getting <div data-title="foo "bar""> which clearly breaks my HTML
[11:55:39] fertapric: any option to do this in a clean/Rails way?
[12:09:06] fertapric: gar_: The problem with that issue is that if I use $('[data-q]').data('q') I get the url encoded parameters, it seems to work with data-title="<%== CGI::escapeHTML(title) %>"
[12:12:42] fertapric: but, I cannot force Rails to do that?
[12:16:37] fertapric: I would like to put the title in an input, <%= text_field_tag :title, title %>, but if the title is: foo "><bar class=" I get <input id="title" name="title" type="text" value="foo "><bar class=""> which also breaks my HTML
[12:18:10] fertapric: I've found that <%== text_field_tag :title, title.tr('"', '\"') %> solves the issue, but it doesn't feel right
[12:20:53] fertapric: Console: remove commas https://gist.github.com/SamiOmer/63224cbdb4dee709305c#file-rails-app-json-L45-L46

2014-12-04

[11:05:41] fertapric: I have a really weird bug with constant autoloading
[11:05:58] fertapric: I'm getting NameError: uninitialized constant RandomLogo
[11:06:19] fertapric: RandomLogo is defined on lib/random_logo.rb
[11:07:10] fertapric: and I'm including in config.autoload_paths the lib dir "#{config.root}/lib" among others
[11:08:02] fertapric: this only seems to happen on our Sidekiq workers
[11:10:15] fertapric: workmad3: I think we are loading the full Rails stack, how do you load just a minimal part of the Rails env?
[11:15:12] fertapric: workmad3: How is it possible that Sidekiq only loads the models that it needs, what happens with all the dependencies? How does it know what to load?
[11:16:11] fertapric: workdmad3: we are runnig our sidekiq workers on production by using sidekiq-manager, with internally calls bundle exec sidekiq
[11:16:55] fertapric: workmad3: sorry, sidekiq-manager is an in-house upstart script :)
[11:18:36] fertapric: workdmad3: this only happens in production, we think it could be related to our deploys
[11:19:28] fertapric: workmad3: (no idea why I keeping calling you "workdmad3" :P)
[11:20:13] fertapric: workmad3: using 'sidekiq', same as production
[11:22:28] fertapric: workmad3: nop :), just the same
[11:23:04] fertapric: workmad3: so, Sidekiq does not load the entire Rails env?
[11:25:18] fertapric: workmad3: last question, how can I force Sidekiq to load the whole Rails env? (to check if the problem is right there)?
[11:25:47] fertapric: workmad3: and thank you! we do appreciate your help
[11:28:59] fertapric: workmad3: I think I skipped that! Really helpful link!
[11:32:26] fertapric: workmad3: I think that link should solve our problem
[11:33:49] fertapric: workmad3: I agree with you, things in lib/ should be required

2014-11-30

[11:22:43] fertapric: uber_hulk: maybe index.js.erb?
[11:25:32] fertapric: vedu: are you sending a multipart email?
[11:28:29] fertapric: vedu: it should look like https://gist.github.com/fertapric/3190fa6d14acbdf64002
[11:32:58] fertapric: uber_hulk: I think you don't need to specify format.js { render json: @productsJson.to_json }, just go for format.js
[11:33:07] fertapric: uber_hulk: or even remove it
[11:33:30] fertapric: uber_hulk: then, change index.html.erb for index.js.erb, since you are passing a JavaScript template
[11:36:56] fertapric: vedu: yes, could you check you have on the same dir mail.html.erb and mail.txt.erb?
[11:39:12] fertapric: uber_hulk: that's how you tell Rails is JavaScript and not HTML
[11:40:19] fertapric: uber_hulk: I would recommend a deeper read on http://guides.rubyonrails.org/working_with_javascript_in_rails.html
[11:43:53] fertapric: uber_hulk: I saw you are using ajax requests. #{{@products}} this is not a valid ERB command, you should use <%= @products.as_json %>
[11:44:46] fertapric: uber_hulk: in addition, every time you print javascript, you should escape it for security reasons, so <%= escape_javascript(@products.as_json)%> will be better
[11:44:54] fertapric: uber_hulk: in addition, every time you print javascript, you should escape it for security reasons, so <%= escape_javascript(@products.as_json) %> will be better
[11:46:15] fertapric: uber_hulk: and you don't need the respond_to do |format| block, Rails automatically will detect is an HTML request
[11:47:05] fertapric: Ryan1013: I see, I thought he was asking about AJAX, not about printing JavaScript directly in the HTML view
[11:48:34] fertapric: uber_hulk: just a side note, I'm not sure what you are trying to accomplish, but passing the a list of products into a JavaScript variable doesn't seem the best way to do things
[11:49:13] fertapric: uber_hulk: I would try to render the view directly using HTML, or provide an API endpoints with the products
[11:57:43] fertapric: uber_hulk: I've never used React, sorry!
[11:59:42] fertapric: uber_hulk: but you should check that SportifyIndex() follows this format <SportifyIndex products="..."> so you can access {this.props.products} on <ProductsList {this.props.products}/>
[12:00:04] fertapric: and I guess you must pass it to ProductsList using <ProductsList products="{this.props.products}" />
[12:00:22] fertapric: uber_hulk: but not sure if that would work... :S
[12:02:07] fertapric: uber_hulk: then, passing it as window.productsJsonData = <%= escape_javascript(@productsJson.as_json) %> should be enough
[12:02:21] fertapric: uber_hulk: you should have your products right on window.productsJsonData variables
[12:03:12] fertapric: uber_hulk: you're welcome
[12:03:56] fertapric: vedu: did you check it?
[12:05:02] fertapric: vedu: hahaha, ok good
[12:09:37] fertapric: uber_hulk: could you paste the whole trace on a gist?
[12:13:58] fertapric: uber_hulk: all the error
[12:18:56] fertapric: uber_hulk: not really, it's better to get the error
[12:24:26] fertapric: uber_hulk: could you print "p @products.as_json" in the controller?
[12:30:01] fertapric: uber_hulk: no idea what's going on
[12:30:18] fertapric: uber_hulk: @products.as_json seems a perfectly formatted string
[12:30:48] fertapric: uber_hulk: so, you should have gsub defined as method on escaped_javascript, since you are applying gsub in a string
[12:43:29] fertapric: uber_hulk: yeah
[12:48:21] fertapric: uber_hulk: yes, it will render that