Enrique Benitez

Joined

2,500 Experience
22 Lessons Completed
0 Questions Solved

Activity

Posted in Dynamic Pricing based on user country

Yeah I'm going to use the Geocoder gem as well as the built-in ip getter from Devise to accomplish that.

Thanks, Chris!

Posted in Dynamic Pricing based on user country

Hello!

I'm thinking of a way to handle dynamic pricing on my web app based on the user country, for example:

A user wants to subscribe for a pro account on my website and this user is based outside the US so that user don't need to pay VAT... So the price for the subscription to my site changes for those users.

How can I handle this more effectively? I was thinking that it's all about the user ip address and then use ruby geocoder.

Thanks! :)

Posted in Action Cable vs Mailboxer?

Differences and pros/cons between Rails 5 new Action Cable vs Mailboxer gem?

What are your thoughts? :)

Posted in jquery.turbolinks not working on my app

I got it working now, I used a different approach, I added <script src="//platform.twitter.com/widgets.js"></script> into the body, so in that way I use an external script tag within the body and now my Twitter share/follow buttons renders correctly along with turbolinks :)

Also, what stopped jquery.turbolinks and event listeners from working correctly was a different story, I got some console errors about a gem I installed, called gon, the error: gon is not defined every time I navigated from page to page using turbolinks, somehow NONE of my js code was working, I believed that was causing the problem (maybe the gon js code never terminated executing?) but I fixed it and now jquery.turbolinks and my js code is all good.

It was so simple to fix, but got my head spinning for like 5 straight hours! LOL

Thanks anyway! =)

Posted in jquery.turbolinks not working on my app

I'm using both jquery and turbolinks on my app and because turbolinks don't make full page loads I need some of my js to fire when navigating between pages using turbolinks, I really don't want to use :data-no-turbolink => true because what I want to do is the same as GoRails Twitter share button on the bottom of my app pages, and if I don't do a full page refresh the Twitter widget is not going to render.

So I installed jquery.turbolinks and require it on my application.js file and that's not working, I dunno why, I even tried to do it without jquery.turbolinks by using $(document).on("ready page:load)" and inside of it the Twitter widget js code and nothing happens.

How does GoRails uses turbolinks and still renders the footer social buttons?

Any solutions?

Thanks in advance! =)

Indeed :D

Thank you Chris! I got it working now.
Easy task, yeah just needed to add the CSS :)

I know it's a turbolinks feature but I don't know how to make it appear or how to do it, it's pretty nice the way GoRails handles the loading with that spinner and bar, how is it done?

Thanks in advance!

Posted in best way to validate URL

Maybe this can help you:

I'd validate it, as it is user data entering your database, you want to validate all user input, all.

Posted in GoRails Markdown and Preview

I don't know which gem is GoRails using but I can recommend you a very good gem for that, it's called RedCarpet, it's what powers Github's markdown rendering, maybe that's the one... Check it out here.

Posted in Using Vagrant for Rails Development Discussion

gem install bundler

Posted in Setup MacOS 10.11 El Capitan Discussion

Did u disabled SIP on OSX El Capitan?

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

So I don't need to have the secrets.yml and database.yml files on my rails project? Just the examples?

Thanks awesome tutorial.