Skip to content

Commit

Permalink
i-- sql requests
Browse files Browse the repository at this point in the history
  • Loading branch information
progressbarsk committed Sep 2, 2012
1 parent 598071f commit b34c72a
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions app/controllers/application_controller.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
protect_from_forgery 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" } layout proc{ |c| c.request.xhr? ? false : "application" }


Expand All @@ -12,33 +12,32 @@ def default_pages


@home_page = ::Refinery::Page.find_by_id(ids[:HOME_PAGE_ID]) @home_page = ::Refinery::Page.find_by_id(ids[:HOME_PAGE_ID])
@colophon_page = ::Refinery::Page.find_by_id(ids[:COLOPHON_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]) @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]) @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') @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 # superuser
# sign_in(::Refinery::User.where(:email => 'info@progressbar.sk').first) if Rails.env.development? # 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(3)) if Rails.env.development? #active member
# sign_in(::Refinery::User.find(268)) if Rails.env.development? #member # sign_in(::Refinery::User.find(268)) if Rails.env.development? #member
end end


def mailing_list
p = params[:subscriber] ? params[:subscriber] : {}
p[:events] = true unless params[:subscriber]
@subscriber = ::Refinery::Mailinglists::Subscriber.new

end

def header_features def header_features
@door_status = ::Refinery::DoorStatuses::DoorStatus.last @door_status = ::Refinery::DoorStatuses::DoorStatus.last
@today_event = ::Refinery::Calendar::Event.live.today.order('featured DESC').first @today_event = ::Refinery::Calendar::Event.live.today.order('featured DESC').first
@upcoming_event = ::Refinery::Calendar::Event.live.upcoming.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 end


# for canonical url # for canonical url
Expand Down

0 comments on commit b34c72a

Please sign in to comment.