Sha256: a2539cdb74f53e7ee1e29d8d830a51b934956f3f61b0263f12771e19a796e27f
Contents?: true
Size: 707 Bytes
Versions: 1
Compression:
Stored size: 707 Bytes
Contents
class SampleController < ApplicationController def index render :inline => %w[ a b c ].map{|action| "<a href='/sample/#{ action }'> /sample/#{ action } </a>"}.join('<br>') end # # check out app/controllers/application.rb and app/views/layout/application.rb # def a render :text => 'forty-two', :layout => 'application' end # # check out app/views/sample/b.rhtml lib/widgets/b.rb app/views/widgets/b.rhtml # def b @b = widget 'b' render end # # check out lib/widgets/c.rb app/views/widgets/c.rhtml # def c @var = 42 @c = widget 'c' render :layout => 'application', :inline => <<-rhtml var: <%= @var %> <hr> <%= @c %> rhtml end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
widgetz-0.0.2 | rails/app/controllers/sample_controller.rb |