xiaoqiu369

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            7 Posts :: 3 Stories :: 2 Comments :: 0 Trackbacks
          按照慣例,還是打印出Hello world.

          /app/controllers/stories_controllers.rb:

          class StoriesController<ActionControllers::Base
              def index
                  @varies="hello world"
              end
          end


          /views/stories/index.html.erb:

          <%=@varies%>

          /config/routes.rb

          ActionController::Routing::Routes.draw do |map|
              map 'stories',:controller=>'stories',:action=>'index'
          end

          啟動服務在IE中打開:
          http://localhost:3000/stories
          OK
          posted on 2008-12-23 16:46 bobqiu 閱讀(175) 評論(0)  編輯  收藏 所屬分類: ruby&rails

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 东安县| 麻江县| 怀集县| 班玛县| 凭祥市| 都昌县| 普宁市| 苍南县| 郸城县| 拉萨市| 乌兰察布市| 民丰县| 肇源县| 东港市| 苏尼特左旗| 吉首市| 恩施市| 涡阳县| 南开区| 丹凤县| 罗山县| 顺平县| 甘泉县| 綦江县| 普安县| 上饶市| 望奎县| 临夏县| 石狮市| 高尔夫| 上栗县| 连山| 郯城县| 古浪县| 通州市| 廉江市| 和平县| 安西县| 措美县| 鄯善县| 禄丰县|