Class: BaseController

Inherits:
ApplicationController
  • Object
show all
Includes:
AuthenticatedSystem, LocalizedApplication
Defined in:
app/controllers/base_controller.rb

Instance Method Summary collapse

Methods included from LocalizedApplication

#get_matching_ui_locale, #get_sorted_langs_from_accept_header, #get_valid_lang_from_accept_header, #set_locale

Methods included from AuthenticatedSystem

#login_by_token, #update_last_seen_at

Instance Method Details



59
60
# File 'app/controllers/base_controller.rb', line 59

def advertise
end

#cache_action?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/controllers/base_controller.rb', line 18

def cache_action?
  !logged_in? && controller_name.eql?('base') && params[:format].blank? 
end

#css_helpObject



62
63
# File 'app/controllers/base_controller.rb', line 62

def css_help
end


48
49
50
51
# File 'app/controllers/base_controller.rb', line 48

def footer_content
  get_recent_footer_content 
  render :partial => 'shared/footer_content' and return    
end

#homepage_featuresObject



53
54
55
56
57
# File 'app/controllers/base_controller.rb', line 53

def homepage_features
  @homepage_features = HomepageFeature.find_features
  @homepage_features.shift
  render :partial => 'homepage_feature', :collection => @homepage_features and return
end

#plaxoObject



26
27
28
# File 'app/controllers/base_controller.rb', line 26

def plaxo
  render :layout => false
end

#rss_site_indexObject



22
23
24
# File 'app/controllers/base_controller.rb', line 22

def rss_site_index
  redirect_to :controller => 'base', :action => 'site_index', :format => 'rss'
end

#site_indexObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'app/controllers/base_controller.rb', line 30

def site_index
  @posts = Post.find_recent

  @rss_title = "#{configatron.community_name} "+:recent_posts.l
  @rss_url = rss_url
  respond_to do |format|
    format.html { get_additional_homepage_data }
    format.rss do
      render_rss_feed_for(@posts, { :feed => {:title => "#{configatron.community_name} "+:recent_posts.l, :link => recent_url},
                            :item => {:title => :title,
                                      :link =>  Proc.new {|post| user_post_url(post.user, post)},
                                       :description => :post,
                                       :pub_date => :published_at}
        })
    end
  end    
end