summaryrefslogtreecommitdiff
path: root/app/models/flag.rb
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-02-02 00:22:54 +0100
committerhukl <hukl@eight.local>2009-02-02 00:22:54 +0100
commit7a5555b1ac542e5fd5680cefaba3574677ecaa46 (patch)
treea501453333e52b25041380cd9349898d0e0d647e /app/models/flag.rb
parentc1854b8b518bde82b80429636f73496a537c3ad5 (diff)
aggregation spike with flags associated to pages
Page has now a named_scope :with_flags which accepts an array of flag names and returns corresponding pages. Can be chained with order and limit
Diffstat (limited to 'app/models/flag.rb')
-rw-r--r--app/models/flag.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/flag.rb b/app/models/flag.rb
new file mode 100644
index 0000000..6d67377
--- /dev/null
+++ b/app/models/flag.rb
@@ -0,0 +1,3 @@
1class Flag < ActiveRecord::Base
2 has_and_belongs_to_many :pages
3end