Skip to main content
Can I 'alias' a Rails active model to another class
General Solved • Asked by Dan Tappin
First off I am sure I am not asking this question correctly as this is an advanced Rails topic over my head right now. Here is what I have for routes: concern :assetable do resources :...
10
posts

Testing your markdown
Testing Solved • Asked by Jay Killeen
I see your markdown tables aren't being rendered as tables. I have the same problem :( Any idea how we get this fixed? | Tables | Are | Cool | | ------------- |:-------------:...
4
posts

How to use the Sentimental gem
Gems / Libraries Solved • Asked by Sascha M.
Hi there, I want to use the Sentimental gem to automatically check if an article is positive negative or neutral. This gem here: https://github.com/7compass/sentimental works fine in the Rails c...
9
posts

Dynamic Pricing based on user country
General Solved • Asked by Enrique Benitez
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 o...
3
posts

dealing with authorized parts in fragment caching
General Solved • Asked by Sean M
I have a facebook/disqus like news feed in my app. Every action handled via AJAX on the posts index page. I have hard time figuring out how to do the russian-doll-catching when there are authorized...
5
posts

Loop through associated records and deliver as csv
General Solved • Asked by Sascha M.
Hi there, I've watched your CSV export episode and I'm using the exact same code to export the records to a CSV. I've got two tables: Orders and Sales. 1 Order has_many Sales and 1 Sale belon...
6
posts

Push bitmap to clients in realtime
General Solved • Asked by Ilya Cherevkov
Hi Chris! I want to create a service which will show a heatmap with some stocks data in realtime (updated each second). Each second there will be around 100 new data points and in general, chart...
2
posts

jquery.turbolinks not working on my app
Javascript Solved • Asked by Enrique Benitez
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 ...
3
posts

Polling/Long Polling navbar notifications
General Solved • Asked by Christophe Estanol
Chris I have been using your implementation of navbar notifications and I really like the way it's constructed. I can implement Facebook style notifications and I am pretty happy about it. Howeve...
4
posts

About In-App Navbar Notifications
General Solved • Asked by Christophe Estanol
Chris, thanks for this one. Notifications work like a charm. I was just wondering... How do I create different JSONs for different models? ``` json.array! @notifications do |notification|...
3
posts

How do I add a loading spinner and bar like this site?
General Solved • Asked by Enrique Benitez
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? *Than...
6
posts

best way to validate URL
Gems / Libraries Solved • Asked by Sean M
Hi Chris! I've been looking for a good URL validator for a while, but all the solutions I found are kinda weird, so I'm not even sure if I wanna use any. Here is my usecase: A user can create...
4
posts

has_one association on polymorphic model
General Solved • Asked by Greg Answer
I have the following models (stripped down for simplicity) : ```ruby class Activity < ActiveRecord::Base belongs_to :trackable, polymorphic: true belongs_to :user has_one :comment, ...
5
posts

How "expensive" are API calls?
General Solved • Asked by Isaac Ben Hutta
I was thinking about an SPA that has a like button. In "Liking Post" tutorial you wrote a method that checks if the current user liked the post, but in an SPA that means I will have to make a call ...
3
posts

Any good tutorials on using rbenv?
General Solved • Asked by tquill
I setup my rails environment using the ubuntu installation guide found on gorails (amazingly helpful, thank you) but I'm not really sure how to use rbenv. I have a few rails apps, and I'm wonder...
4
posts

Pundit scopes
General Solved • Asked by Dmitry Amelchenko
Hi, i have no idea how to choose best way. There are three models User, Department and Task. Each user assigned to one department (belongs to). Department has many tasks. How to write a policy or s...
3
posts

URL Based multi tenancy
General Solved • Asked by Oyewole Samuel
I'm new to Ruby on Rails, trying my best to catch up. for example... i've a domain and a username append to it, www.domain.com/samsoft, how can i achieve this and also routing? sample code will be ...
2
posts

Elastic search & search kick incorporating dates fields and integers
General Solved • Asked by John Munyi
HI Chris, I implemented elastic search using search kick gem and all went well from search, autocomplete and suggestions when dealing with text. Now i wanna perform a similar search on tabl...
11
posts

Single Devise User Model or Multiple Devise Models?
Gems / Libraries Solved • Asked by ronald chacon
Hi all, I am planning to create an application that will have several types of users with a couple shared fields and many unrelated fields. What would be my best option? After doing some rese...
9
posts

Rspec Test on Multi tanent app with aparment gem
General Solved • Asked by Francisco Quinones
Hi I'm having a hard time figuring this out. https://gist.github.com/Frank004/8aa4acf20f60a3666a42 Im starting to do test on my Multitenant app and encounter a problem when trying to run the...
2
posts

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.