Sha256: 4bb5b45d4919b5a387e005db63a7c66ce101cfddcc62579c8dbaf5f7c34225f6

Contents?: true

Size: 735 Bytes

Versions: 11

Compression:

Stored size: 735 Bytes

Contents

class Forge::HelpTopicsController < ForgeController

  def index
    @help_topics = HelpTopic.order(:title).group(:title, :id)
    respond_to do |format|
      format.js { render :layout => false }
      format.html { }
    end
  end

  def show
    @help_topic = HelpTopic.where(:slug => params[:slug]).first
    respond_to do |format|
      format.js { render :layout => false }
      format.html { }
    end
  end

  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

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.9 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.8 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.7 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.6 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.5 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.4 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.3 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.2 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.1 lib/forge/app/controllers/forge/help_topics_controller.rb
forge-cli-0.1.0 lib/forge/app/controllers/forge/help_topics_controller.rb