Commit Graph

58 Commits

Author SHA1 Message Date
xiaohui c5d4fce6e1
compact with rack 2.0.8+ 2019-12-20 11:14:20 +08:00
Russell Osborne b59f640b19 Use action dispatch filter to support nested filters and other rails 5 features. 2017-05-26 12:18:47 -04:00
Russell Osborne d1058a030e Remove filtered params from being stored in db 2017-05-26 12:18:47 -04:00
Jonas Grau dab5ffce83 Merge pull request #243 from charlotte-ruby/fix-counter-cache-not-updating
Fix counter cache not updating when no `unique` option is set
2017-05-24 21:50:37 +02:00
jgrau dd6779946d
Default counter_cache to count all impressions 2017-05-10 22:02:45 +02:00
M. Simon Borg 5ed366de82 use before_action for rails 5, maintain backwards compat. 2017-05-10 15:20:11 -04:00
Dmitry Yarikov a0fddc9072 Fix: wrong number of arguments (given 2, expected 0..1) 2016-07-08 11:42:33 +03:00
asharma-ror 8c3407fd33 Adding params field to migration file. 2015-04-22 10:43:47 +05:30
asharma-ror 2e72b5aefa params feature 2015-04-21 15:51:47 +05:30
Md. Tauhidul Islam f77d187f66 Unique impressionist count for objects which are using friendly_id 2015-02-07 22:08:32 +06:00
Bashir Eghbali 78a35925b2 cleaned up the logic. too much double negative 2014-02-21 15:32:07 -08:00
Bashir Eghbali 2e5dabe9b3 added :if and :unless conditionals to impressionist 2014-02-21 13:13:33 -08:00
Antonio C Nalesso Moreira 71b081c749 Merge pull request #136 from geoffharcourt/geoffharcourt-issue_135
Only define Impressionable::ClassMethods::DEFAULT_CACHE when undefined
2013-12-31 13:19:21 -08:00
Geoff Harcourt ed00e3ffe2 Use more concise declaration of DEFAULT_CACHE
In response to @acnalesso’s notes on
e3f86c8051, using ||= to make assignment
of Impressionable::ClassMethods::DEFAULT_CACHE more concise, avoiding a
call to #defined? when checking to see if the constant has been
declared.
2013-12-31 14:51:24 -05:00
Geoff Harcourt e3f86c8051 Only define Impressionable::ClassMethods::DEFAULT_CACHE when undefined
Current behavior causes unnecessary warning messages to be issued when
using Impressionist with application preloaders such as spring.
2013-12-28 15:01:39 -05:00
Hannes Staffler bad17466ee added functionality to filter by message 2013-12-13 10:20:20 +01:00
jd pagano a3a44a88fd Refactor impressionist_count method in impressionable.rb method to be more human readable 2013-10-28 17:54:09 +00:00
Peter M. Goldstein 68ea36a7fe Make associative_create_statement protected rather than private, so it can be accessed by subclasses. This makes it easy for subclasses to add custom fields to the impression. 2013-09-22 11:43:59 -07:00
Linus Pettersson acef02935c Check for version 4 instead of 3 2013-08-16 23:42:03 +02:00
Linus Pettersson 36eb6cacb2 Fixed unique count for Rails 4 2013-08-16 23:37:30 +02:00
Antonio C Nalesso Moreira f0eca5b513 FIX #97, and refactored 2013-07-19 03:57:13 +01:00
Antonio C Nalesso Moreira d737ee37af FIX #96 2013-07-12 04:00:37 +01:00
Antonio C Nalesso Moreira 034af8d987 FIX #92, Allow options to be passed to counter_cache unique, and clean up 2013-07-06 03:14:25 +01:00
John McAliley ce935aaa38 change controller_path back to controller_name
This is causing missing constant errors for people who are upgrading
2013-05-07 21:40:59 -03:00
ChaYoung You df8489163e Change generating impressionable_type by from controller_name to controller_path 2013-04-01 04:19:24 +09:00
Michael Elfassy 00e658b28d fix for bug undefined method 'belongs_to' for Impression:Class 2012-10-10 12:03:18 -04:00
Asif S Kalam 9104ddb7b7 Avoid updating timestamp when updating counter_cache. 2012-07-04 19:53:25 +05:30
Erik Michaels-Ober 63ea4d5663 Merge pull request #36 from challengepost/namespace_impressionable_methods
Namespace impressionable methods
2012-03-21 12:48:51 -07:00
Erik Michaels-Ober 95125f4627 Merge pull request #37 from challengepost/optimize_impressionist_count
Optimize impressionist_count query via arel count with distinct option
2012-03-21 12:47:18 -07:00
Ross Kaffenberger 3a64d4b9ab Add extract controller logic for bypassing impression to bot? method 2012-03-20 17:04:00 -04:00
Ross Kaffenberger fcfacdfdc9 Optimize impressionist_count query via arel count with distinct option 2012-03-19 18:27:41 -04:00
Ross Kaffenberger f59f897d25 Deprecation warning for counter_caching? 2012-03-19 15:56:42 -04:00
Ross Kaffenberger 4c2c09ca69 Rename instance method update_counter_cache => update_impressionist_counter_cache 2012-03-19 14:33:19 -04:00
Ross Kaffenberger 380f49cf62 namespace impressionable model module class methods with 'impressionist_' 2012-03-19 14:31:05 -04:00
Tute Costa 1c3f809da8 Moves ORM specific code to lib/impressionist/:orm/models. Adds mongo_mapper models.
Adds config/initializers/impression.rb file on install.
2012-03-12 19:54:29 -03:00
Tute Costa 0e7d75d1ec Impressionable now extends ActiveSupport::Concern. Adds pg gem to test_app. 2012-03-12 18:10:25 -03:00
Tute Costa 952ce40ff9 White listing all Impression attributes according to new Rails active_record.whitelist default. 2012-03-12 17:34:01 -03:00
Erik Michaels-Ober 1174647779 Cleanup trailing whitespace
Trailing whitespace isn't friendly to git or vim users.
2012-03-06 14:04:32 -08:00
Kai Schlichting e5566fad8a speedup unique impressions by using "Impression#exists?" instead of "#Impression#size == 0" 2012-01-19 21:29:23 +01:00
mio 7a113edeb2 added :dependent => :destroy to is_impressionable 2011-12-13 13:51:23 +01:00
Cory Schires e2ee248fba Added documentation for ability to set conditions for recording impressions. Also, Had to do some work to get the tests passing
Merge remote branch 'upstream/master'

Conflicts:
  test_app/Gemfile.lock
2011-11-27 13:39:45 -06:00
mio 132f1f74ec fixed typo 2011-11-10 14:14:51 +01:00
mio e63e835936 added draft for impressionist(...) uniqueness 2011-11-09 18:10:35 +01:00
mio 09bfa2f27e implemented first version for unique check on controller level. 2011-11-07 20:41:51 +01:00
Cory Schires aef6acc583 Move AR include into engine file. 2011-11-04 10:27:13 -05:00
Cory Schires 5386874eca Better tests for counter caching. 2011-10-31 13:19:03 -05:00
Cory Schires 77219d23a5 Added tests for counter cache logic 2011-10-31 12:02:31 -05:00
Cory Schires 9d0b22515b Added support for counter cache column. 2011-10-29 17:24:57 -05:00
John McAliley ff5e76a60b add new method that takes options hash, instead of using ugly method names.
fix for postgres select bug
upgrades in test_app Gemfile
2011-06-03 11:54:58 -04:00
John McAliley ae5ae23e1c Add referrer to impression model.
remove unused features dir.
2011-06-03 11:52:42 -04:00