Class: Forge::HelpTopicsController
Instance Method Summary
collapse
#get_menu_items, #load_help, #set_crumbs, #set_title, #uses_ckeditor
#app_init
Instance Method Details
#index ⇒ Object
3
4
5
6
7
8
9
|
# File 'lib/forge/app/controllers/forge/help_topics_controller.rb', line 3
def index
@help_topics = HelpTopic.order(:title).group(:title, :id)
respond_to do |format|
format.js { render :layout => false }
format.html { }
end
end
|
#search ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/forge/app/controllers/forge/help_topics_controller.rb', line 19
def search
@page_title = "Searching Help for: #{params[:q]}"
q = params[:q] ? params[:q] : ""
@help_topics = HelpTopic.where(
"LOWER(content) LIKE :q OR LOWER(title) LIKE :q",
{:q => q.downcase}
)
respond_to do |format|
format.js { render :layout => false }
end
end
|
#show ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/forge/app/controllers/forge/help_topics_controller.rb', line 11
def show
@help_topic = HelpTopic.where(:slug => params[:slug]).first
respond_to do |format|
format.js { render :layout => false }
format.html { }
end
end
|