Skip to main content
Limit CSV export by Day, Week and Month
General Solved • Asked by Sascha M.
Hi there, is there an easy way to limit the results inside a CSV export to a specific time-frame, like day, week and month? Thanks!
2
posts

How do I include a placeholder for empty notifications
General Solved • Asked by Stan Smith
Your In-App Notification code worked perfectly. However I'm stuck on what code to use to display a placeholder message if there aren't any notifications. You mentioned this briefly in the episo...
3
posts

How do i update an attribute for belongs_to association when scraping a site?
General Solved • Asked by Wesly Mezarina
So pretty much a `anime` belongs_to :season and a `season` has_many :animes. I'm scraping a site and i'm collecting the season like "Spring 2015". I want to be able to assign "Spring 2015" to a an...
6
posts

data consistency for invitation registration
General Solved • Asked by Sean M
Hey! At the moment I have a user and a product table and products are created by users. So the user can create his own product he is working on. User `has_many :products` and `product belongs_to...
10
posts

How to by pass a string that has '???????' when scraping for dates and turning the date into an integer?
General Solved • Asked by Wesly Mezarina
I'm scraping a anime information website. Right now, I'm trying to get the date going, but on some of the anime the date comes out as ???,??,????. I'm tying to figure out how to skip that or put so...
7
posts

Rails console hacks :)
Rails Solved • Asked by Sascha M.
Hi there, I need some help how to handle the rails console commands. I'm really stuck here.. I've recently added a new column (teams) to my Sales and Orders model. Both models containing the ...
3
posts

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

Subscribe to the newsletter

Join 22,346+ 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.