Sha256: 606b55cde633f0f55a309c61ceea3073421c94dfcb876b6089925ae5a20089aa

Contents?: true

Size: 1.19 KB

Versions: 2

Compression:

Stored size: 1.19 KB

Contents

<% counter = 0 -%>
<% controller_modules.each_with_index do |mod, i| -%>
<%= "  " * i %>module <%= mod %>
<% counter = i -%>
<% end -%>
<% counter = counter == 0 ? 0 : (counter + 1) -%>
<%= "  " * counter %>class <%= controller_class_name %> < Application
  
<%= "  " * counter %>  def index
<%= "  " * counter %>    render
<%= "  " * counter %>  end

<%= "  " * counter %>  def show
<%= "  " * counter %>    render
<%= "  " * counter %>  end

<%= "  " * counter %>  def new
<%= "  " * counter %>    render
<%= "  " * counter %>  end

<%= "  " * counter %>  def edit
<%= "  " * counter %>    render
<%= "  " * counter %>  end

<%= "  " * counter %>  def delete
<%= "  " * counter %>    render
<%= "  " * counter %>  end

<%= "  " * counter %>  def create
<%= "  " * counter %>    render
<%= "  " * counter %>  end

<%= "  " * counter %>  def update
<%= "  " * counter %>    render
<%= "  " * counter %>  end

<%= "  " * counter %>  def destroy
<%= "  " * counter %>    render
<%= "  " * counter %>  end
  
<%= "  " * counter %>end
<% counter = counter == 0 ? 0 : (counter - 1) -%>
<% controller_modules.reverse.each_with_index do |mod, i| -%>
<%= "  " * counter %>end # <%= mod %>
<% counter = counter - 1 -%>
<% end -%>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
merb-gen-0.9.2 merb_default_generators/resource_controller/templates/app/controllers/%controller_file_name%.rb
merb-gen-0.9.3 merb_default_generators/resource_controller/templates/app/controllers/%controller_file_name%.rb