Page 1 of 1
[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.
[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
[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: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: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: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: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
[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)
[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
[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 ?
[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
[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
[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: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:17:41] badoo: skullcrasher, you just have to add this in your model: after_update :update_src_based_on_type
[12:21:40] badoo: http://stackoverflow.com/questions/11106339/can-i-set-active-record-callbacks-for-arbitrary-model-methods/30800222#30800222
[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
[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: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: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:22:10] badoo: tubbo: It's working, I can't believe I missed that, I should take a break more ofter
[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