To edit pages or tickets please login with username/password: aaf/aaf

Changeset 135

Show
Ignore:
Timestamp:
02/02/07 22:13:22 (2 years ago)
Author:
jk
Message:

module flattening+renaming, extracted act_methods out of class_methods, and other preparations for implementation of remote indexing via drb. Due to the number of changes trunk will be only for the brave for now :-)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/demo/app/models/comment.rb

    r111 r135  
    11class Comment < ActiveRecord::Base 
    2   belongs_to :parent, :class_name => 'Content' 
     2  belongs_to :parent, :class_name => 'Content', :foreign_key => :parent_id 
    33   
    44  # simplest case: just index all fields of this model: 
  • trunk/demo/app/views/admin/backend/search.rhtml

    r83 r135  
    11<h1>Search Content (backend)</h1> 
    2 <%= form_tag :action => 'search' %> 
     2<% form_tag :action => 'search' do %> 
    33  <fieldset> 
    44    <legend>Search</legend> 
     
    66  </fieldset> 
    77  <%= submit_tag 'search' %> 
    8 <%= end_form_tag %> 
     8<% end %> 
    99 
    1010<% if @results -%> 
  • trunk/demo/app/views/content/edit.rhtml

    r5 r135  
    11<h1>Editing content</h1> 
    22 
    3 <%= start_form_tag :action => 'update', :id => @content %> 
     3<% form_tag :action => 'update', :id => @content do %> 
    44  <%= render :partial => 'form' %> 
    55  <%= submit_tag 'Edit' %> 
    6 <%= end_form_tag %> 
     6<% end %> 
    77 
    88<%= link_to 'Show', :action => 'show', :id => @content %> | 
  • trunk/demo/app/views/content/new.rhtml

    r5 r135  
    11<h1>New content</h1> 
    22 
    3 <%= start_form_tag :action => 'create' %> 
     3<% form_tag :action => 'create' do %> 
    44  <%= render :partial => 'form' %> 
    55  <%= submit_tag "Create" %> 
    6 <%= end_form_tag %> 
     6<% end %> 
    77 
    88<%= link_to 'Back', :action => 'list' %> 
  • trunk/demo/app/views/content/search.rhtml

    r5 r135  
    11<h1>Search Content</h1> 
    2 <%= form_tag :action => 'search' %> 
     2<% form_tag :action => 'search' do %> 
    33  <fieldset> 
    44    <legend>Search</legend> 
     
    66  </fieldset> 
    77  <%= submit_tag 'search' %> 
    8 <%= end_form_tag %> 
     8<% end %> 
    99 
    1010<% if @results -%> 
  • trunk/demo/test/functional/admin/backend_controller_test.rb

    r83 r135  
    2020  def test_search 
    2121    get :search 
    22     assert_success 
     22    assert_response :success 
    2323    assert_template 'search' 
    2424    assert_nil assigns(:results) 
  • trunk/demo/test/unit/content_test.rb

    r122 r135  
    187187 
    188188  def test_multi_index 
    189     i =  FerretMixin::Acts::ARFerret::MultiIndex.new([Content, Comment]) 
     189    i =  ActsAsFerret::MultiIndex.new([Content, Comment]) 
    190190    hits = i.search(TermQuery.new(:title,"title")) 
    191191    assert_equal 1, hits.total_hits 

To edit pages or tickets please login with username/password: aaf/aaf