美文网首页
常用语句

常用语句

作者: bigbug_ | 来源:发表于2017-09-12 08:47 被阅读0次

    命令

    rails g controller admin::categories
    rails generate controller StaticPages home help //定制静态页面
    rails destroy controller StaticPages home help //删除
    rails generate model User name:string email:string //创建model
    rails destroy model User //移除model

    view

    <%= current_user.email %>
    <%= if current_user && current_user == job.user %>

    controller

    job.user.email
    10.times{ |i| Category.create!( :name => "#{i} Category" ) }
    @posts = Post.where(:ststus => 'completed').limit(10).order('id DESC')

    console

    Job.delete_all

    相关文章

      网友评论

          本文标题:常用语句

          本文链接:https://www.haomeiwen.com/subject/wcxnjxtx.html