From 7a5555b1ac542e5fd5680cefaba3574677ecaa46 Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 2 Feb 2009 00:22:54 +0100 Subject: 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 --- test/fixtures/flags.yml | 7 +++++++ test/unit/flag_test.rb | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/fixtures/flags.yml create mode 100644 test/unit/flag_test.rb (limited to 'test') diff --git a/test/fixtures/flags.yml b/test/fixtures/flags.yml new file mode 100644 index 0000000..157d747 --- /dev/null +++ b/test/fixtures/flags.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +one: + name: MyString + +two: + name: MyString diff --git a/test/unit/flag_test.rb b/test/unit/flag_test.rb new file mode 100644 index 0000000..49b0d96 --- /dev/null +++ b/test/unit/flag_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class FlagTest < ActiveSupport::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end -- cgit v1.3