Class: BaseController
Direct Known Subclasses
ActivitiesController, AdminController, AdsController, AlbumsController, AuthorizationsController, CategoriesController, ClippingsController, CommentsController, EventsController, FavoritesController, ForumsController, FriendshipsController, HomepageFeaturesController, InvitationsController, MessagesController, MetroAreasController, ModeratorsController, MonitorshipsController, PagesController, PasswordResetsController, PhotoManagerController, PhotosController, PostsController, RsvpsController, SbPostsController, SessionsController, SitemapController, StatisticsController, TagsController, TopicsController, UsersController, VotesController
Instance Method Summary
collapse
#get_matching_ui_locale, #get_sorted_langs_from_accept_header, #get_valid_lang_from_accept_header, #set_locale
#login_by_token, #update_last_seen_at
Instance Method Details
#advertise ⇒ Object
59
60
|
# File 'app/controllers/base_controller.rb', line 59
def advertise
end
|
#cache_action? ⇒ 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_help ⇒ Object
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
render :partial => 'shared/footer_content' and return
end
|
#homepage_features ⇒ Object
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
|
#plaxo ⇒ Object
26
27
28
|
# File 'app/controllers/base_controller.rb', line 26
def plaxo
render :layout => false
end
|
22
23
24
|
# File 'app/controllers/base_controller.rb', line 22
def
redirect_to :controller => 'base', :action => 'site_index', :format => 'rss'
end
|
#site_index ⇒ Object
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.} "+:recent_posts.l
@rss_url =
respond_to do |format|
format.html { get_additional_homepage_data }
format. do
(@posts, { :feed => {:title => "#{configatron.} "+: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
|