zoukankan      html  css  js  c++  java
  • Ruby on Rails Tutorial 第三章 静态页面

    1、生成静态页面

      $ rails generate controller StaticPages home help    #生成主页和帮助页面的路由、控制器及静态页面

      $ rails destroy controller StaticPages home help      #撤销生成操作

      $ bundle exec rake db:migrate   #迁移操作

      $ bundle exec rake db:rollback    #撤销迁移

    2、开始测试

      TDD: Test Driven Development,测试驱动开发

    3、重构有点动态内容的页面

      声明:<% provide(:title, "Home")%>

      使用:<%= yield(:title)%>

         <%= yield %>

      DRY: Don't Repeat Yourself!

      嵌入式Ruby

      CSRF:跨站请求伪造

  • 相关阅读:
    rebar
    namenode ha
    jmx
    doclint in jdk8
    maven source
    avd
    ccw-ide
    ST3使用
    Web worker
    离线web-ApplicationCache
  • 原文地址:https://www.cnblogs.com/sunflower627/p/4624484.html
Copyright © 2011-2022 走看看