- Revision
- 181
- Author
- fabio.kung
- Date
- 2007-06-21 02:59:29 -0500 (Thu, 21 Jun 2007)
Log Message
displaying variables from controller and custom templates (render now works as expected)
Modified Paths
Diff
Modified: trunk/examples/jruby-example/resources/hello.rhtml (180 => 181)
--- trunk/examples/jruby-example/resources/hello.rhtml 2007-06-21 07:58:21 UTC (rev 180) +++ trunk/examples/jruby-example/resources/hello.rhtml 2007-06-21 07:59:29 UTC (rev 181) @@ -1,14 +1,18 @@ <html> <head><title>Ruby Toys -- </title></head> <body> - - <%= self.inspect %> + <p>Instance var: <%= @my_instance_var %></p> + <p><%=h self.inspect %></p> <%= h('<[EMAIL PROTECTED]') %> <% (1..10).each do |i| %> <%= i %> <% end %> + <p><%= parameters["someValue"] %></p> + <p><%= params["someValue"] %></p> + <p><%= params %></p> + Works </body> </html> \ No newline at end of file
Modified: trunk/examples/jruby-example/src/main/ruby/ruby/hello.rb (180 => 181)
--- trunk/examples/jruby-example/src/main/ruby/ruby/hello.rb 2007-06-21 07:58:21 UTC (rev 180) +++ trunk/examples/jruby-example/src/main/ruby/ruby/hello.rb 2007-06-21 07:59:29 UTC (rev 181) @@ -1,7 +1,13 @@ class HelloController def index + @my_instance_var = "Testing instance vars..." render("hello.rhtml") end + def test_method + @value = "Other Value" + render "other.rhtml" + end + end \ No newline at end of file
To unsubscribe from this list please visit:
