IBM®
跳转到主要内容
    中国 [选择]    使用条款
 
 
Select a scope: Search for:    
    首页    产品    服务与解决方案     支持与下载    个性化服务    
跳转到主要内容

developerWorks 中国  >  Web development | Java technology | Open source  >

Ruby on Rails 和 J2EE:两者能否共存?

两个 Web 应用程序框架的比较

developerWorks

返回文章


清单 2. order_controller.rb
				
01  class OrderController < ActionController::Base
02    def list
03      @orders = Order.find_all            // Find all orders and set instance variable
04                                          // framework automatically forwards to list.rhtml
05    end
06
07    def delete
08      id = @params["id"]                  // Get the order id from the request
09      Order.delete(id)                    // Delete the order
10      redirect_to :action => "list"       // Forward to the list action (list method)
11    end
12  end

返回文章

    关于 IBM 隐私条约 联系 IBM 使用条款