Permalink
Browse files

i-- sql requests

  • Loading branch information...
1 parent 598071f commit b34c72a1b84c3d90d04b708b824094d25e5e0e87 progressbarsk committed Sep 2, 2012
Showing with 13 additions and 14 deletions.
  1. +13 −14 app/controllers/application_controller.rb
@@ -1,7 +1,7 @@
class ApplicationController < ActionController::Base
protect_from_forgery
- before_filter :default_pages, :mailing_list, :header_features
+ before_filter :default_pages, :init_features
layout proc{ |c| c.request.xhr? ? false : "application" }
@@ -12,33 +12,32 @@ def default_pages
@home_page = ::Refinery::Page.find_by_id(ids[:HOME_PAGE_ID])
@colophon_page = ::Refinery::Page.find_by_id(ids[:COLOPHON_PAGE_ID])
- @blog_page = ::Refinery::Page.find_by_id(ids[:BLOG_PAGE_ID])
- @wiki_page = ::Refinery::Page.find_by_id(ids[:WIKI_PAGE_ID])
@contact_page = ::Refinery::Page.find_by_id(ids[:CONTACT_PAGE_ID])
- @events_page = ::Refinery::Page.find_by_id(ids[:EVENTS_PAGE_ID])
@join_us_page = ::Refinery::Page.find_by_id(ids[:JOIN_US_PAGE_ID])
- @projects_page = ::Refinery::Page.find_by_id(ids[:PROJECTS_PAGE_ID])
- @sponsors_page = ::Refinery::Page.find_by_id(ids[:SPONSORS_PAGE_ID])
@records_page = ::Refinery::Page.find_by_path('/records')
- @registration = ::Refinery::Registrations::Registration.new
+ # @blog_page = ::Refinery::Page.find_by_id(ids[:BLOG_PAGE_ID])
+ # @wiki_page = ::Refinery::Page.find_by_id(ids[:WIKI_PAGE_ID])
+ # @events_page = ::Refinery::Page.find_by_id(ids[:EVENTS_PAGE_ID])
+ # @projects_page = ::Refinery::Page.find_by_id(ids[:PROJECTS_PAGE_ID])
+ # @sponsors_page = ::Refinery::Page.find_by_id(ids[:SPONSORS_PAGE_ID])
+
# superuser
# sign_in(::Refinery::User.where(:email => 'info@progressbar.sk').first) if Rails.env.development?
# sign_in(::Refinery::User.find(3)) if Rails.env.development? #active member
# sign_in(::Refinery::User.find(268)) if Rails.env.development? #member
end
- def mailing_list
- p = params[:subscriber] ? params[:subscriber] : {}
- p[:events] = true unless params[:subscriber]
- @subscriber = ::Refinery::Mailinglists::Subscriber.new
-
- end
-
def header_features
@door_status = ::Refinery::DoorStatuses::DoorStatus.last
@today_event = ::Refinery::Calendar::Event.live.today.order('featured DESC').first
@upcoming_event = ::Refinery::Calendar::Event.live.upcoming.first
+
+ @registration = ::Refinery::Registrations::Registration.new
+
+ p = params[:subscriber] ? params[:subscriber] : {}
+ p[:events] = true unless params[:subscriber]
+ @subscriber = ::Refinery::Mailinglists::Subscriber.new(p)
end
# for canonical url

0 comments on commit b34c72a

Please sign in to comment.