Ruby on Rails Community Forum

How can I implement back button and bookmark history with turbolinks ajax and rails 4?

3
General
Hi guys! I have been asking this question everywhere... basically I am building a user dashboard and it load the main div with ajax calls. I wanted to know how can I update the URL when an ajax c...
Chris Oliver replied

Stripe Payments

3
Gems / Libraries
Hey, love the new Stripe video but I'm stuck on something. I am getting the error: uninitialized constant ActionView::CompiledTemplates::STRIPE_PUBLIC. It's having a problem with my meta tag which...
Chris Oliver replied

Subtract until zero then go to next record

4
General
Hi, I am looking for this: for a warehouse application for ordering and keeping stock for machine maintenance . i have multiple record of items that coming in. On Monday i received a item 5 ti...
Chris Oliver replied

2Checkout in Rails

3
General
HI Chris, I'm new to here and new to rails. i saw your screencast about stripe payment gateway, i learn lot from that video.. i need to ask for favor. could you please make another screencast abou...
Shairyar Baig replied

Handle multiple binding when using CoffeeScript & Turbolinks

11
Javascript
Hi, After watching the screencast about extracting JS code to CS classes, I tried to follow the same pattern. The problem I am facing is that the page loads new items through AJAX and in order for ...
Chris Oliver replied

What is the spinning icon I see on GoRails?

2
General
I see a spinning/loading icon on the right. In addition, I see the loading lightning-like animation right below the address bar, what gem is it? or what library are you using? Thanks. Tim
Francisco Quinones replied

Making a gem like thoughtbot's refills gem

3
Gems / Libraries
Heya, I saw on HN the other day that USDS has released a styleguide/component system based off of Bourbon. I'd like to toy around with making a gem based off of the Refills gem that allows me to l...
Chris Oliver replied

AASM state based on variable

3
General
Hi, I am using AASM and i want to set the state based on the total_price of a purchase order. is this code below the way to go or can it be refactored. ```ruby before_save :check_budget event :...
Chris Oliver replied

twilio as verification mobile systems

2
Gems / Libraries
Hello I'd really like to implement the following tutorial (verify phone number by sms) http://fullstackstanley.com/read/verifying-mobile-phone-numbers-with-rails-devise-and-twilio It doesn't work...
corrado tuccitto replied

How do I implement voting in Rails?

2
General
I have an app that has a resource called 'pins'. I want to add upvoting, and possibly downvoting, to the pins, so that I can rank them on the site Sort of like Reddit karma. I was thinking that an ...
karl replied

How do I allow a multi-select to be sortable?

0
General
I have a ton of many-to-many relationships in a CMS I built for work. I am currently using [Select2 3.5.3](http://select2.github.io/select2/) to assign these relationships. This all works well. ...
Thomas Bush posted

Using Microsoft ADFS with Ruby on Rails and Omniauth based on a example cast.

2
General
Building a app that uses ADFS is tricky - maybe making a screencast would be a good idea. https://craig.io/using-microsoft-adfs-with-ruby-on-rails-and-omniauth/ there is a semi beta solution for ...
Dmitry Kolesnikov replied

What do you think about this ?

4
General
It's been a few months I follow you Chris and I'd like to say **thank you** for all what you've done. I often watch your episodes and a question got out of my mind, so I have to ask. What do you ...
Chris Oliver replied

How to display multiple models in the same infinite scroll

2
General
So I have a Post model and a Category model and a User model. So a user can have many posts and a post can have many categories. So returning a group of posts is very easy, however a post can hav...
Aaron Mills replied

Just sharing: Squash your migrations

7
General
I've gone into problem when my test db is using sqlite and I use postgres in prod Sqlite doesn't have `inet` attribute like postgres and I went into some old migration that I don't use anymore. So,...
Chris Oliver replied

Build a Devise Model in another controller

4
Gems / Libraries
Lets say we have a Company model which accepts_nested_attributes_for User (devise Model) How do we Save both a company and User model having that a Company has_many :users and a User belongs to a ...
Roman Storm replied

Good public national holidays api?

6
General
I am working on a project and I need an api from which to import all the national holidays for a certain country and even for specific regions in that country. So for example I could import all t...
ryan-cal replied

Advanced Rails books and materials

0
General
Hi guys ... and girls. I am interested in any advanced rails materials you might know about that are actually good. Most of the stuff is beginner level and something advanced is hard to come by. ...
Andrei Crudu posted

Pundit: How to apply the same policy to nested resources

3
General
working with pundit gem. Is it possible to apply the same rule to nested resources? if show is not allowed in lecture_policy then show in lesson_policy should not be allowed too. ``` Lecture ...
Chris Oliver replied

Multi form devise registration setup with admin approval

2
Gems / Libraries
Scenario: Implement a registration with multiple steps and after all is complete, display "We will approve your application" at the end and wait when an internal admin (only to owners of the app) w...
Roman Storm replied

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.