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

Changeset 245

Show
Ignore:
Timestamp:
09/17/07 09:41:41 (10 months ago)
Author:
jk
Message:

#171 - :remote now is true by default; fixes to demo app

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/demo/app/controllers/contents_controller.rb

    r228 r245  
    1717    if @content.save 
    1818      flash[:notice] = 'Content was successfully created.' 
    19       redirect_to :action => 'list' 
     19      redirect_to contents_url 
    2020    else 
    2121      render :action => 'new' 
    2222    end 
     23    logger.error "#############{@content.errors.full_messages}" 
    2324  end 
    2425 
  • trunk/demo/app/models/content_base.rb

    r244 r245  
    1717                  :store_class_name => true, 
    1818                  :boost => :record_boost, 
    19                   :remote           => ENV['AAF_REMOTE']
     19                  :remote           => ENV['AAF_REMOTE'] == 'true'
    2020 
    2121  def comment_count; 0 end 
  • trunk/demo/app/views/contents/new.rhtml

    r228 r245  
    11<h1>New content</h1> 
    22 
    3 <% form_for :content, @content, contents_path, :html => { :method => :post } do |f| %> 
     3<% form_for :content, @content, :url => contents_path, :html => { :method => :post } do |f| %> 
    44  <%= render :partial => 'form', :object => f %> 
    55  <%= submit_tag "Create" %> 
  • trunk/demo/app/views/searches/search.html.erb

    r232 r245  
    1515  <ul> 
    1616    <% for result in @results -%> 
    17       <li><%= link_to result.title, content_path(result) %></li> 
     17      <li><%= link_to result.title, content_path(result.id) %></li> 
    1818    <% end -%> 
    1919  </ul> 
  • trunk/demo/config/ferret_server.yml

    r242 r245  
    77  port: 9010 
    88  pid_file: log/ferret.pid 
     9  log_file: log/ferret_server_dev.log 
     10  log_level: info 
    911test: 
    1012  host: localhost 
     
    1214  pid_file: log/ferret.pid 
    1315  log_file: log/ferret_server_test.log 
    14   log_level: info 
     16  log_level: debug 
    1517 
  • trunk/plugin/acts_as_ferret/lib/act_methods.rb

    r244 r245  
    6767    # last Hash argument. 
    6868    def acts_as_ferret(options={}, ferret_options={}) 
     69      # default to DRb mode 
     70      options[:remote] = true if options[:remote].nil? 
    6971 
    7072      # force local mode if running *inside* the Ferret server - somewhere the 
     
    7577      # work. In this case you'll get endless loops resulting in "stack level too deep"  
    7678      # errors.  
    77       # To get around this, start the server with the environment variable  
     79      # To get around this, start the DRb server with the environment variable  
    7880      # FERRET_USE_LOCAL_INDEX set to '1'. 
    7981      logger.debug "Asked for a remote server ? #{options[:remote].inspect}, ENV[\"FERRET_USE_LOCAL_INDEX\"] is #{ENV["FERRET_USE_LOCAL_INDEX"].inspect}, looks like we are#{ActsAsFerret::Remote::Server.running || ENV['FERRET_USE_LOCAL_INDEX'] ? '' : ' not'} the server" 

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