[Ironruby-core] Question about Ivan Porto carrero MVC Sample

Mohammad Azam lists at ruby-forum.com
Tue Jun 23 11:49:52 EDT 2009


Hi Ivan Porto carrero,

Great work on the MVC IronRuby sample!

I am curious to know how it works! I created an ASP.NET MVC application.
I created the controller and view but how will the views get called.

Here is my controller:

require 'application_controller'

class HomeController < ApplicationController


  def index
    @message = "Welcome from IronRuby!"
    view('Index')
  end

  def about
    view('Index')
  end

end


And here is the view:

<h2><%= html.encode(view_data.message) %></h2>
    <p>
        To learn more about ASP.NET MVC visit <a
href="http://asp.net/mvc" title="ASP.NET MVC
Website">http://asp.net/mvc</a>.
</p>


Thanks!
-- 
Posted via http://www.ruby-forum.com/.


More information about the Ironruby-core mailing list