Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

active_median

Median for ActiveRecord

Subscribe to updates I use active_median


Statistics on active_median

Number of watchers on Github 212
Number of open issues 0
Average time to close an issue about 12 hours
Main language Ruby
Average time to merge a PR about 13 hours
Open pull requests 0+
Closed pull requests 0+
Last commit about 2 years ago
Repo Created almost 6 years ago
Repo Last Updated about 1 year ago
Size 22 KB
Organization / Authorankane
Contributors2
Page Updated
Do you use active_median? Leave a review!
View active_median activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating active_median for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

ActiveMedian

Median for ActiveRecord - PostgreSQL only at the moment

Build Status

Item.median(:price)

Works with grouping, too.

Order.group("date_trunc('week', created_at)").median(:total)

Installation

Add this line to your applications Gemfile:

gem 'active_median'

And create a migration to add the median function to the database.

rails g migration create_median_function

with:

def up
  ActiveMedian.create_function
end

def down
  ActiveMedian.drop_function
end

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

active_median list of languages used
Other projects in Ruby