Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
89 views

Querying and rendering an HTML table of ISP performance statistics

I have multiples measurements and I want to render it into tables like this Measurements Operator browsings FTP DL FTP UL Location Event Date Operator avg min max avg min max avg min max Verizon ...
buncis's user avatar
  • 107
3 votes
2 answers
345 views

Build a pizza and choose your toppings

I've created a scenario below, in which a user can build a pizza and choose their toppings, then order their pizza: ...
Kori John Roys's user avatar
1 vote
2 answers
2k views

Finding mongodb records in batches using mongoid [closed]

I want to get records in batches. But mongoid doc says to avoid using skip due as it can be expensive. I wrote this method to iterate through a large number records efficiently. ...
tessie's user avatar
  • 315
3 votes
1 answer
111 views

Rails UserHelper method

I need help cleaning up this monstrosity. Basically this is a user helper method that generates an array of cumulative user sign ups per week (start of week == Wednesday) starting 2016-06-15. So ...
GhostRider's user avatar
1 vote
2 answers
1k views

Rails create create default database records

In my application I have an accounts model: class Account < ActiveRecord::Base belongs_to :user has_many :invoices end The ...
James's user avatar
  • 113
6 votes
1 answer
146 views

Seeding a database

I'm seeding my database with a relatively complex data model. Constraints: Every meal has exactly one main dish (marked as is_main in intermediate table). Here is ...
ROR learning's user avatar
4 votes
2 answers
74 views

Multiple DB record creation after a successful operation

I am working on a payment process. Upon a successful payment process, I have to create multiple records. For that, I have made this class: ...
abhinavmsra's user avatar
5 votes
1 answer
433 views

Rails models for Users, Offers, Comments, Documents, and Reviews

I want to simplify my Rails models, current looks like this: ...
user2931706's user avatar
4 votes
0 answers
125 views

Heterogenous tree in the application domain: How do I represent them?

The Domain I have three types of items in my domain: ItemA, ItemB, ItemC. (I can't use their real names.) ItemA has one attribute: thing_id. ItemB has 6 attributes: thing_id, name, description, ...
Eva's user avatar
  • 1,125
3 votes
2 answers
131 views

Getting student demographics report with ActiveRecord

I have two active records StudentDemographics and StudentWeeklyReport both having has_many ...
user2906085's user avatar