Commit 0bee68c899672bf5c8c0a53464a870169d08b359
1 parent
65b230c5
Exists in
master
and in
22 other branches
ActionItem18: using Article instead of Comatose::Page
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@419 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
5 changed files
with
11 additions
and
2 deletions
Show diff stats
app/controllers/cms_controller.rb
app/controllers/content_viewer_controller.rb
... | ... | @@ -4,7 +4,7 @@ class ContentViewerController < ApplicationController |
4 | 4 | path = params[:page].clone |
5 | 5 | path.unshift(params[:profile]) |
6 | 6 | @path = path.join('/') |
7 | - @page = Comatose::Page.find_by_path(@path) | |
7 | + @page = Article.find_by_path(@path) | |
8 | 8 | if @page.nil? |
9 | 9 | render :action => 'not_found', :status => 404 |
10 | 10 | end | ... | ... |
db/migrate/008_add_comatose_support.rb
... | ... | @@ -22,6 +22,10 @@ class AddComatoseSupport < ActiveRecord::Migration |
22 | 22 | t.column "version", :integer |
23 | 23 | t.column "updated_on", :datetime |
24 | 24 | t.column "created_on", :datetime |
25 | + | |
26 | + # added for STI in noosfero | |
27 | + t.column 'type', :string | |
28 | + | |
25 | 29 | end |
26 | 30 | Comatose::Page.create_versioned_table |
27 | 31 | puts "Creating the default 'Home Page'..." | ... | ... |
test/functional/content_viewer_controller_test.rb
... | ... | @@ -17,7 +17,7 @@ class ContentViewerControllerTest < Test::Unit::TestCase |
17 | 17 | def test_should_display_homepage |
18 | 18 | uses_host 'anhetegua.net' |
19 | 19 | |
20 | - Comatose::Page.expects(:find_by_path).with('aprofile').returns(Comatose::Page.new) | |
20 | + Article.expects(:find_by_path).with('aprofile').returns(Article.new) | |
21 | 21 | |
22 | 22 | get :view_page, :profile => 'aprofile', :page => [] |
23 | 23 | assert_response :success | ... | ... |