diff --git a/app/models/proposal.rb b/app/models/proposal.rb index 96ca7c1da..3b00c4350 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -45,12 +45,12 @@ class Proposal < ActiveRecord::Base scope :sort_by_relevance, -> { all } scope :sort_by_flags, -> { order(flags_count: :desc, updated_at: :desc) } scope :sort_by_archival_date, -> { archived.sort_by_confidence_score } - scope :archived, -> { where("proposals.created_at <= ?", Setting["months_to_archive_proposals"].to_i.months.ago)} - scope :not_archived, -> { where("proposals.created_at > ?", Setting["months_to_archive_proposals"].to_i.months.ago)} + scope :archived, -> { where("proposals.created_at <= ?", Setting["months_to_archive_proposals"].to_i.months.ago) } + scope :not_archived, -> { where("proposals.created_at > ?", Setting["months_to_archive_proposals"].to_i.months.ago) } scope :last_week, -> { where("proposals.created_at >= ?", 7.days.ago)} scope :retired, -> { where.not(retired_at: nil) } scope :not_retired, -> { where(retired_at: nil) } - scope :successful, -> { where("cached_votes_up + physical_votes >= ?", Proposal.votes_needed_for_success)} + scope :successful, -> { where("cached_votes_up >= ?", Proposal.votes_needed_for_success) } def to_param "#{id}-#{title}".parameterize @@ -99,7 +99,7 @@ class Proposal < ActiveRecord::Base end def total_votes - cached_votes_up + physical_votes + cached_votes_up end def voters diff --git a/app/views/layouts/_meta_tags.html.erb b/app/views/layouts/_meta_tags.html.erb new file mode 100644 index 000000000..443f7352f --- /dev/null +++ b/app/views/layouts/_meta_tags.html.erb @@ -0,0 +1,5 @@ +" /> + +" /> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 27d9a7f35..ce84c44af 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,7 +4,8 @@ - <%=render "layouts/tracking_data"%> + <%= render "layouts/tracking_data" %> + <%= render "layouts/meta_tags" %>