badoo

Activity Graph

Page 1 of 1

2016-06-17

[19:31:21] badoo: has joined #RubyOnRails
[19:33:41] badoo: Hi everyone, I'm trying to enhance my website page load time, so I'm deleting unneccesary assets from my app. I'd like to know how to compile assets in development environement so I can see the exact sizes of my js and css files.
[21:46:42] badoo: Quit: Konversation terminated!

2016-06-06

[16:16:09] badoo: has joined #RubyOnRails
[18:49:19] badoo: Quit: Konversation terminated!

2016-06-01

[22:50:50] badoo: has joined #RubyOnRails
[22:53:09] badoo: Hi everyone, I'm trying to override a gem method which works fine, but inside that method there's a condition that doesn't work as expected, can you please take a look?
[22:53:18] badoo: http://stackoverflow.com/questions/37578332/overriding-a-method-from-a-gem-with-a-condition-in-rails-4
[22:58:43] badoo: this method is in a module in the gritter gem
[22:59:08] badoo: ok thanks a lot for :)
[23:00:50] badoo: so the methods "browser.mobile?" and "is_mobile_request?" will always return false in my module right ?
[23:03:13] badoo: I honestly don't know how the requests work in rails (with actiondispatch and rack)
[23:03:52] badoo: but do you think that I can access that from the module ?
[23:04:55] badoo: ok let me see
[23:07:35] badoo: so I added puts request.env["HTTP_USER_AGENT"] in my module and this is what I got:
[23:07:43] badoo: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
[23:07:51] badoo: seems like it's working
[23:09:37] badoo: it works: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
[23:12:09] badoo: so that means that in my browser.ua in my controller would get a different result ?
[23:12:31] badoo: I don't understand
[23:13:13] badoo: because I use that a lot in my controllers
[23:13:31] badoo: and it returns true
[23:13:44] badoo: I'm a bit confused
[23:13:49] badoo: iphone 5 on chrome
[23:14:21] badoo: I mean I'm on a desktop but simulating an iphone 5 with chrome
[23:15:13] badoo: ok thanks for your help
[23:15:32] badoo: I'm going to print browser.ua in my view and see what I get
[23:17:20] badoo: Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1
[23:17:25] badoo: this is what I get in my view
[23:17:30] badoo: it's not the same thing
[23:17:49] badoo: yea I knew it was different
[23:18:14] badoo: so annoying, why would the module show me a different user agent ?
[23:18:59] badoo: it's gritter it just displays a small notification
[23:19:07] badoo: it's a javascript library actually
[23:19:32] badoo: for displaying notifications
[23:20:46] badoo: SO to display notifications I don't use flash[:notice]
[23:20:58] badoo: I do gflash notice: "say something here"
[23:21:28] badoo: then gritter takes care of displaying the notification in my views
[23:21:36] badoo: nothing too complicated
[23:22:05] badoo: now the problem is that I'm trying to make a different site for mobile with framework7, and I need to override that
[23:23:48] badoo: so how can I make sure it's a mobile browser in my module ?
[23:24:24] badoo: or should I override the gflash method somewhere else ?
[23:25:18] badoo: I have an idea
[23:32:29] badoo: yea thanks a lot for your help
[23:32:54] badoo: I know what I'm going to do now
[23:55:17] badoo: Read error: Connection reset by peer

2016-05-24

[00:04:59] badoo: has joined #RubyOnRails
[00:14:07] badoo: Quit: Konversation terminated!
[00:14:19] badoo: has joined #RubyOnRails
[00:22:54] badoo: Ping timeout: 260 seconds
[15:10:56] badoo: has joined #RubyOnRails
[15:25:09] badoo: Quit: Konversation terminated!
[15:27:28] badoo: has joined #RubyOnRails
[16:33:28] badoo: Quit: Konversation terminated!
[20:46:07] badoo: has joined #RubyOnRails
[20:55:03] badoo: Quit: Konversation terminated!

2016-05-23

[17:12:31] badoo: has joined #RubyOnRails
[19:40:10] badoo: Quit: Konversation terminated!

2016-02-23

[01:29:01] badoo: has joined #RubyOnRails
[01:32:34] badoo: Client Quit

2016-02-05

[20:59:55] badoo: has joined #RubyOnRails
[21:09:00] badoo: Hi everyone, I'm having this weird error on my new machine when I try to install gems: Errno::ETIMEDOUT: Connection timed out - connect(2) for "rubygems.global.ssl.fastly.net" port 443 (https://rubygems.org/specs.4.8.gz)
[21:09:18] badoo: but on vagrant everything works fine, any idea ?
[22:09:02] badoo: Ping timeout: 272 seconds

2016-02-02

[05:06:15] badoo: Quit: Konversation terminated!

2016-02-01

[20:32:22] badoo: has joined #RubyOnRails
[21:44:00] badoo: Quit: Konversation terminated!
[21:44:26] badoo: has joined #RubyOnRails
[21:45:10] badoo: Client Quit
[21:57:42] badoo: has joined #RubyOnRails
[22:26:48] badoo: Quit: Konversation terminated!
[22:28:15] badoo: has joined #RubyOnRails
[22:41:51] badoo: Quit: Konversation terminated!
[22:47:29] badoo: has joined #RubyOnRails

2016-01-31

[23:58:09] badoo: has joined #RubyOnRails
[23:58:38] badoo: has left #RubyOnRails: ()
[23:58:50] badoo: has joined #RubyOnRails
[23:59:43] badoo: Client Quit

2016-01-30

[19:08:38] badoo: has joined #RubyOnRails
[19:08:39] badoo: has joined #spree
[23:15:18] badoo: Remote host closed the connection

2016-01-21

[19:48:07] badoo: has joined #spree
[19:48:07] badoo: has joined #RubyOnRails
[21:15:43] badoo: Quit: Leaving

2015-12-29

[02:00:07] badoo: has joined #RubyOnRails
[02:00:08] badoo: has joined #spree
[02:02:22] badoo: Hi Im wondering how I can 2 have 2 forms (one for a user registration and an other one for an new object of that user)
[02:03:27] badoo: for example if someone who isn't logged in wants to create a new classified he should have at the same time the registration form and the classified form
[02:11:00] badoo: Quit: Leaving

2015-12-16

[14:42:49] badoo: has joined #RubyOnRails
[14:42:50] badoo: has joined #spree
[18:48:45] badoo: Read error: Connection reset by peer

2015-12-15

[17:56:32] badoo: has joined #spree
[17:56:32] badoo: has joined #RubyOnRails
[18:00:08] badoo: Hi, I have a simple question. I'm using the globalize gem. Let's say I'm currently using the spanish locale but I want to retrieve the original post title (with the default locale in english for example) in a specific case how can I do that ?
[18:01:02] badoo: (post.title isnt a good example actually let's say a post category)
[19:55:29] badoo: Read error: Connection reset by peer
[20:11:50] badoo: has joined #RubyOnRails
[20:11:50] badoo: has joined #spree
[22:59:21] badoo: Read error: No route to host

2015-12-04

[12:40:17] badoo: has joined #spree
[12:40:17] badoo: has joined #RubyOnRails
[12:51:22] badoo: hi everyone, I'm using devise and I want to do some javascript when a user signs up for the first time, how should I do that ?
[12:52:18] badoo: when a user signs in*
[13:09:08] badoo: Ping timeout: 246 seconds
[13:19:28] badoo: has joined #spree
[13:19:28] badoo: has joined #RubyOnRails
[14:57:15] badoo: Remote host closed the connection

2015-12-02

[11:22:20] badoo: has joined #RubyOnRails
[11:22:21] badoo: has joined #spree
[13:00:58] badoo: Ping timeout: 260 seconds

2015-12-01

[16:31:24] badoo: has joined #RubyOnRails
[17:54:45] badoo: has joined #spree
[22:07:33] badoo: Ping timeout: 250 seconds

2015-11-30

[02:18:02] badoo: Remote host closed the connection
[15:49:00] badoo: has joined #RubyOnRails
[16:08:14] badoo: Read error: Connection reset by peer
[16:09:30] badoo: has joined #RubyOnRails
[16:19:14] badoo: Read error: Connection reset by peer
[16:19:40] badoo: has joined #RubyOnRails
[16:44:33] badoo: Quit: Quitte

2015-11-29

[13:02:57] badoo: has joined #RubyOnRails
[13:04:26] badoo: you can reload specific content with ajax
[13:04:45] badoo: by using partials that way you don't have to reload the whole page
[13:11:18] badoo: what exactly do you want to render ?
[13:14:49] badoo: you can create an action in your controllers that renders in js, create a view (youraction.js.erb) and then render your partial inside a div on or something like so: $('your-div'').append("<%= escape_javascript render(:partial => 'your-partial') %>");
[13:15:35] badoo: you'll also have to add a route for this action and in your main view where your select your dropdown call this action with some ajax, it's a bit complicated
[13:22:14] badoo: Hey guys, in my app I have two relations: users have one institution and institutions habtm users; https://imgur.com/7kBZ1VM
[13:22:23] badoo: Do you believe that it's a good idea ?
[13:53:09] badoo: I think that you can do that with the onchange function on the whole form
[13:54:47] badoo: Moeh_ there's also a gem called best_in_place you should check it out
[15:08:50] badoo: Quit: Quitte
[23:20:35] badoo: has joined #RubyOnRails
[23:23:46] badoo: VeryBewitching you can call a method with js and ajax
[23:24:30] badoo: ah yes indeed

2015-11-27

[01:55:36] badoo: Quit: Quitte

2015-11-26

[00:16:24] badoo: rails 2.3 ? :o
[00:18:29] badoo: yea I think so
[00:23:36] badoo: arcanez you might find a solution but rails 2 still has a lot of security vulnerabilities, you really should try to upgrade your app
[00:27:31] badoo: I'm gonna sign my first contract with a client in a few days
[00:27:42] badoo: do you guys have any tips ? I'm a junior dev
[02:17:14] badoo: Quit: Quitte
[23:34:48] badoo: has joined #RubyOnRails

2015-11-25

[01:41:56] badoo: has joined #RubyOnRails
[01:43:45] badoo: Client Quit
[11:09:37] badoo: has joined #RubyOnRails
[12:06:02] badoo: skullcrasher: you can use the update_attribute method in your controller
[12:08:22] badoo: skullcrasher: maybe an after_update method in your object model that checks the type and then updates the src sttribute it shouldnt be complicated
[12:08:43] badoo: a method that you call with the after_update callback*
[12:09:20] badoo: skullcrasher: you know how to do that ?
[12:11:27] badoo: skullcrasher, yea in your model you create the method that updates the src attribute, and then call this method with the after_update callback in your model
[12:12:02] badoo: the problem is that it's going to run everytime you update your model but there are ways to check if the type attribute has been changed
[12:12:50] badoo: happy to help :)
[12:17:41] badoo: skullcrasher, you just have to add this in your model: after_update :update_src_based_on_type
[12:17:46] badoo: and then create the method
[12:19:26] badoo: what's the difference ?
[12:21:26] badoo: I see that there are ways to add the activerecord callbacks to activeresource
[12:21:40] badoo: http://stackoverflow.com/questions/11106339/can-i-set-active-record-callbacks-for-arbitrary-model-methods/30800222#30800222
[12:22:45] badoo: why do you use activeresource ? I never even heard of it :p
[14:33:50] badoo: good question
[14:34:51] badoo: worknick I think that there are some good gems out there
[14:37:03] badoo: worknick I know casein is simple and easy to integrate but I never tried it
[14:38:40] badoo: in which cases do you guys use decorators ?
[14:45:32] badoo: Ping timeout: 246 seconds
[15:09:39] badoo: has joined #RubyOnRails
[17:07:27] badoo: Ping timeout: 255 seconds
[17:24:40] badoo: has joined #RubyOnRails
[17:39:35] badoo: Ping timeout: 240 seconds
[18:05:01] badoo: has joined #RubyOnRails
[18:35:45] badoo: Quit: Leaving
[18:44:00] badoo: has joined #RubyOnRails
[19:17:57] badoo: Ping timeout: 250 seconds
[19:32:02] badoo: has joined #RubyOnRails
[20:04:52] badoo: Quit: Leaving
[20:05:30] badoo: has joined #RubyOnRails
[20:14:26] badoo: Remote host closed the connection
[23:45:31] badoo: has joined #RubyOnRails

2015-11-24

[19:49:28] badoo: has joined #RubyOnRails
[19:54:19] badoo: Hi guys, I'm having an issue with devise and single table inhgeritance any kind of help would be greatly appreciated http://stackoverflow.com/questions/33902094/devise-sti-and-strong-parameters
[19:56:36] badoo: wow your vimrc is pretty long :p
[19:57:10] badoo: I tried to use vim but I gave up 3 months later
[20:05:08] badoo: sounds like faye (publish subscribe)
[20:05:41] badoo: I never used wisper, when do you guys use that gem ?
[20:06:45] badoo: sounds great
[20:09:52] badoo: is there anyone here who can help me with an issue I have with devise ?
[20:13:18] badoo: tubbo: thanks a lot I'm struggling with devise and single table inheritance http://stackoverflow.com/questions/33902094/devise-sti-and-strong-parameters
[20:13:51] badoo: so how would the validations work ?
[20:14:45] badoo: a school has some specific fields that need to be validated and I don't know how to do that without sti
[20:15:08] badoo: no I didn't try that, let me see
[20:16:53] badoo: but the problem is that schools (schools are a kind of user) registration requires some specific fields that normal users or admin don't
[20:18:43] badoo: tubbo: I still have the same issue
[20:19:52] badoo: oh wait... :o
[20:20:01] badoo: I can't belived I missed that
[20:20:47] badoo: omg I've been struggling with this for hours let me see...
[20:22:10] badoo: tubbo: It's working, I can't believe I missed that, I should take a break more ofter
[21:19:56] badoo: messine: have you tried rails-assets ?
[21:20:31] badoo: messine: https://rails-assets.org/
[21:21:20] badoo: you can add your assets in your gemfile it's very easy
[22:01:23] badoo: weird bug
[22:02:16] badoo: did you check the logs ?
[22:54:31] badoo: Read error: Connection reset by peer
[23:04:54] badoo: has joined #RubyOnRails
[23:19:45] badoo: Remote host closed the connection
[23:30:18] badoo: has joined #RubyOnRails
[23:34:51] badoo: Has anyone tried using single table inheritance with devise?
[23:35:12] badoo: I'm building a new app it works fine for the moment but I don't know how it's going to scale
[23:53:40] badoo: Quit: Quitte