Commit 755ef3bca203b3d17ae84e81f73bf783aee34689

Authored by Joenio Costa
1 parent 479e4060
Exists in elasticsearch_api

model extensions working with the new helper name

plugins/elasticsearch/lib/ext/article.rb
1 1 require_dependency 'article'
2   -require_relative '../elasticsearch_helper'
  2 +require_relative '../elasticsearch_indexed_model'
3 3  
4 4 class Article
5   - include INDEXED_MODEL
  5 + include ElasticsearchIndexedModel
6 6  
7 7 def self.control_fields
8   - %w(advertise published).map{ |e| e.to_sym }
  8 + [
  9 + :advertise,
  10 + :published,
  11 + ]
9 12 end
10 13  
11 14 def self.indexable_fields
... ...
plugins/elasticsearch/lib/ext/category.rb
1 1 require_dependency 'category'
  2 +require_relative '../elasticsearch_indexed_model'
2 3  
3 4 class Category
4 5 def self.control_fields
5 6 %w()
6 7 end
7   -
8   - require_relative '../elasticsearch_helper'
9 8 end
... ...
plugins/elasticsearch/lib/ext/comment.rb
1 1 require_dependency 'comment'
  2 +require_relative '../elasticsearch_indexed_model'
2 3  
3 4 class Comment
4 5 def self.control_fields
5   - %w()
  6 + %w()
6 7 end
7   -
8   - require_relative '../elasticsearch_helper'
9 8 end
... ...
plugins/elasticsearch/lib/ext/license.rb
1 1 require_dependency 'license.rb'
  2 +require_relative '../elasticsearch_indexed_model'
2 3  
3 4 class License
4 5 def self.control_fields
5 6 %w()
6 7 end
7   -
8   - require_relative '../elasticsearch_helper'
9 8 end
... ...
plugins/elasticsearch/lib/ext/national_region.rb
1 1 require_dependency 'national_region'
  2 +require_relative '../elasticsearch_indexed_model'
2 3  
3 4 class NationalRegion
4 5 def self.control_fields
5 6 %w()
6 7 end
7   -
8   - require_relative '../elasticsearch_helper'
9 8 end
... ...
plugins/elasticsearch/lib/ext/profile.rb
1 1 require_dependency 'profile'
  2 +require_relative '../elasticsearch_indexed_model'
2 3  
3 4 class Profile
4 5 def self.control_fields
5 6 %w( visible public_profile )
6 7 end
7   -
8   - require_relative '../elasticsearch_helper'
9 8 end
... ...
plugins/elasticsearch/lib/ext/scrap.rb
1 1 require_dependency 'scrap'
  2 +require_relative '../elasticsearch_indexed_model'
2 3  
3 4 class Scrap
4 5 def self.control_fields
5   - %w(advertise published)
  6 + %w(advertise published)
6 7 end
7   -
8   - require_relative '../elasticsearch_helper'
9 8 end
... ...
plugins/elasticsearch/lib/ext/user.rb
1 1 require_dependency 'user'
  2 +require_relative '../elasticsearch_indexed_model'
2 3  
3 4 class User
4 5 def self.control_fields
5   - %w()
  6 + %w()
6 7 end
7   -
8   - require_relative '../elasticsearch_helper'
9 8 end
... ...