themes_controller.rb

来自「用ruby on rails写的一个博客程序,还不错..ruby on rail」· RB 代码 · 共 21 行

RB
21
字号
class Admin::ThemesController < Admin::BaseController  def index    @themes = Theme.find_all    @themes.each do |theme|      theme.description_html = TextFilter.filter_text(this_blog, theme.description, nil, [:markdown,:smartypants])    end    @active = this_blog.current_theme  end  def preview    send_file "#{Theme.themes_root}/#{params[:theme]}/preview.png", :type => 'image/png', :disposition => 'inline', :stream => false  end  def switchto    this_blog.theme = params[:theme]    this_blog.save    redirect_to :action => 'index'  endend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?