Commit 57af24adefc4a9f7cd62cd8095a484ec78c85f0c
Exists in
master
and in
27 other branches
Merge branch 'master' of gitlab.com:noosfero/noosfero
Showing
3 changed files
with
12 additions
and
4 deletions
Show diff stats
app/views/layouts/application-ng.html.erb
| ... | ... | @@ -6,6 +6,10 @@ |
| 6 | 6 | <!--<meta http-equiv="refresh" content="1"/>--> |
| 7 | 7 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| 8 | 8 | |
| 9 | + <% unless defined? MetadataPlugin and environment.enabled_plugins.include? 'MetadataPlugin' %> | |
| 10 | + <meta name="description" content="<%= @environment.name %>" /> | |
| 11 | + <% end %> | |
| 12 | + | |
| 9 | 13 | <!-- site root --> |
| 10 | 14 | <meta property="noosfero:root" content="<%= Noosfero.root %>"/> |
| 11 | 15 | ... | ... |
plugins/metadata/lib/ext/environment.rb
plugins/pg_search/db/migrate/20130320010063_create_indexes_for_search.rb
| 1 | 1 | class CreateIndexesForSearch < ActiveRecord::Migration |
| 2 | + SEARCHABLES = %w[ article comment qualifier national_region certifier profile license scrap category ] | |
| 3 | + KLASSES = SEARCHABLES.map {|searchable| searchable.camelize.constantize } | |
| 2 | 4 | def self.up |
| 3 | - searchables = %w[ article comment qualifier national_region certifier profile license scrap category ] | |
| 4 | - klasses = searchables.map {|searchable| searchable.camelize.constantize } | |
| 5 | - klasses.each do |klass| | |
| 5 | + KLASSES.each do |klass| | |
| 6 | 6 | fields = klass.pg_search_plugin_fields |
| 7 | 7 | execute "create index pg_search_plugin_#{klass.name.singularize.downcase} on #{klass.table_name} using gin(to_tsvector('simple', #{fields}))" |
| 8 | 8 | end |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | 11 | def self.down |
| 12 | - klasses.each do |klass| | |
| 12 | + KLASSES.each do |klass| | |
| 13 | 13 | execute "drop index pg_search_plugin_#{klass.name.singularize.downcase}" |
| 14 | 14 | end |
| 15 | 15 | end | ... | ... |