README.md in spree_active_sale-1.3.0 vs README.md in spree_active_sale-1.3.1
- old
+ new
@@ -7,20 +7,20 @@
----------
## FEATURES
* Provides a quick implementation of flash sales/ daily deals behavior by a easy scheduler a.k.a *ActiveSale*.
-* Provides an admin interface for creating/ scheduling, managing, or re-scheduling sale events.
-* Provides a view helper for countdown timer to show sale's ending time, which will be shown to your customers. This eventually makes a sense of urgency in your customers' mind.
+* Provides an admin interface for creating/ scheduling, managing, sorting, bundeling, or re-scheduling sale events.
+* Provides a view helper for countdown timer to show sale's ending time, which will be shown to your customers. This eventually makes a sense of urgency on your customers' mind.
* Supplies methods for class <tt>Spree::ActiveSaleEvent</tt> like: <tt>live</tt>, <tt>active</tt>, <tt>live_active</tt>, <tt>hidden</tt>, <tt>live_active_and_hidden</tt>, <tt>upcoming_events</tt>, <tt>starting_today</tt>, <tt>ending_today</tt>.
## LINKS
* Demo application: [Spree Active Sale Demo](https://github.com/suryart/spree_active_sale_demo)
* Dependency status: [![Dependency Status](https://gemnasium.com/suryart/spree_active_sale.png)](https://gemnasium.com/suryart/spree_active_sale)
* Code climate: [![Code Climate](https://codeclimate.com/github/suryart/spree_active_sale.png)](https://codeclimate.com/github/suryart/spree_active_sale)
-* Build Status: [![Build Status](https://travis-ci.org/suryart/spree_active_sale.png?branch=v1.3.0)](https://travis-ci.org/suryart/spree_active_sale)
+* Build Status: [![Build Status](https://travis-ci.org/suryart/spree_active_sale.png?branch=master)](https://travis-ci.org/suryart/spree_active_sale)
* Issues: [Project issues](https://github.com/suryart/spree_active_sale/issues)
* Fork: [Fork this Project](https://github.com/suryart/spree_active_sale/fork_select)
## INSTALLATION
@@ -38,11 +38,11 @@
```
* Or get it from rubygems.org by mentioning the following line in your Gemfile:
```ruby
- gem 'spree_active_sale', '1.0.6'
+ gem 'spree_active_sale', '1.3.0'
```
### Then run the following commands:
$ bundle install
@@ -174,10 +174,19 @@
# to check if an instance/ object is live or not?.
# Here instance can be an object of
# "Spree::ActiveSaleEvent", "Spree::Variant", "Spree::Product", or "Spree::Taxon" class.
# Which simply says if sale event for that instance is accessible for users or not.
Spree::ActiveSaleEvent.is_live?(instance)
+
+ # You can list the rows where a column, for example- :start_date, is not blank,
+ # and get it sorted using not_blank_and_sorted_by(:column_name) like this:
+ Spree::SaleEvent.not_blank_and_sorted_by(:start_date)
+ Spree::ActiveSale.not_blank_and_sorted_by(:start_date)
+ Spree::ActiveSaleEvent.not_blank_and_sorted_by(:start_date)
+
+ # Also, you can chain this method with other scopes, like this:
+ Spree::ActiveSaleEvent.live_active.not_blank_and_sorted_by(:start_date)
```
## Overriding countdown timer's layout differently for different events
There is a view helper which shows the count down timer. This extension uses [jQuery Countdown](http://keith-wood.name/countdown.html) library for countdown timer. View helper available for count down timer is:
@@ -192,11 +201,11 @@
Please visit [jQuery Countdown](http://keith-wood.name/countdown.html) for more layouts.
## Overriding configuration and preferences
-You can use put this at the bottom of your **application's app/config/initializers/spree.rb**:
+You can use this at the bottom of your **application's app/config/initializers/spree.rb** for configuration:
```ruby
Spree::ActiveSale.config do |config|
config.admin_active_sales_per_page = 20
config.active_sales_per_page = 10
@@ -209,9 +218,10 @@
```ruby
Spree::ActiveSaleConfig[:paginate_sale_events_for_admin?] = true
Spree::ActiveSaleConfig[:paginate_sales_for_admin?] = true
Spree::ActiveSaleConfig[:paginate_sale_events_for_user?] = true
Spree::ActiveSaleConfig[:paginate_sales_for_user?] = false
+ Spree::ActiveSaleConfig[:name_with_event_position?] = true
```
## TODOs
* Improve testing and write more test cases.