Skip to main content

All Questions

Tagged with
1 vote
2 answers
83 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
326 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
89 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
134 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
5 votes
2 answers
92 views

Selecting users with biopsies in a given country for charting

I have this monstrosity ...
GhostRider's user avatar
4 votes
1 answer
48 views

Usertool For Website Admins -- Follow up

A while ago, I posted about creating a user tool for forum admins that allows them to add, edit, and delete users from their desktops. This still is not complete, posting for review on tool so far I'...
13aal's user avatar
  • 842
2 votes
1 answer
101 views

Importing Excel file to a database just once

How should I rewrite an if-return-else condition in the middle of this function? ...
poc's user avatar
  • 605
4 votes
2 answers
65 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
428 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
117 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,115
3 votes
2 answers
118 views

Getting student demographics report with ActiveRecord

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