Changeset 245
- Timestamp:
- 09/17/07 09:41:41 (10 months ago)
- Files:
-
- trunk/demo/app/controllers/contents_controller.rb (modified) (1 diff)
- trunk/demo/app/models/content_base.rb (modified) (1 diff)
- trunk/demo/app/views/contents/new.rhtml (modified) (1 diff)
- trunk/demo/app/views/searches/search.html.erb (modified) (1 diff)
- trunk/demo/config/ferret_server.yml (modified) (2 diffs)
- trunk/plugin/acts_as_ferret/lib/act_methods.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/demo/app/controllers/contents_controller.rb
r228 r245 17 17 if @content.save 18 18 flash[:notice] = 'Content was successfully created.' 19 redirect_to :action => 'list'19 redirect_to contents_url 20 20 else 21 21 render :action => 'new' 22 22 end 23 logger.error "#############{@content.errors.full_messages}" 23 24 end 24 25 trunk/demo/app/models/content_base.rb
r244 r245 17 17 :store_class_name => true, 18 18 :boost => :record_boost, 19 :remote => ENV['AAF_REMOTE'] )19 :remote => ENV['AAF_REMOTE'] == 'true') 20 20 21 21 def comment_count; 0 end trunk/demo/app/views/contents/new.rhtml
r228 r245 1 1 <h1>New content</h1> 2 2 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| %> 4 4 <%= render :partial => 'form', :object => f %> 5 5 <%= submit_tag "Create" %> trunk/demo/app/views/searches/search.html.erb
r232 r245 15 15 <ul> 16 16 <% 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> 18 18 <% end -%> 19 19 </ul> trunk/demo/config/ferret_server.yml
r242 r245 7 7 port: 9010 8 8 pid_file: log/ferret.pid 9 log_file: log/ferret_server_dev.log 10 log_level: info 9 11 test: 10 12 host: localhost … … 12 14 pid_file: log/ferret.pid 13 15 log_file: log/ferret_server_test.log 14 log_level: info16 log_level: debug 15 17 trunk/plugin/acts_as_ferret/lib/act_methods.rb
r244 r245 67 67 # last Hash argument. 68 68 def acts_as_ferret(options={}, ferret_options={}) 69 # default to DRb mode 70 options[:remote] = true if options[:remote].nil? 69 71 70 72 # force local mode if running *inside* the Ferret server - somewhere the … … 75 77 # work. In this case you'll get endless loops resulting in "stack level too deep" 76 78 # errors. 77 # To get around this, start the server with the environment variable79 # To get around this, start the DRb server with the environment variable 78 80 # FERRET_USE_LOCAL_INDEX set to '1'. 79 81 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"
