Sha256: 2d2f4bf5822a5b7d910075ac044231e6ec1b6a5308034a66e16cb4052c8b358c

Contents?: true

Size: 559 Bytes

Versions: 12

Compression:

Stored size: 559 Bytes

Contents

module <%= @generation_app_name %>::Controllers
  class View<%= @generation_class_name %> < R '/<%= @generation_view_name %>/(\d)'
    def get(id)
      @<%= @generation_view_name %> = Models::<%= @generation_class_name %>.find(id)
      render :view_<%= @generation_view_name %>
    end
    def post(id)
      @<%= @generation_view_name %> = Models::<%= @generation_class_name %>.find(id)
      # @<%= @generation_view_name %>.<field> = input.<field> 
      @<%= @generation_view_name %>.save
      render :view_<%= @generation_view_name %>
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bivouac-0.0.6 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.0.7 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.0.5 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.1.0 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.1.1 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.0.8 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.0.9 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.1.2 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.1.3 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.1.4 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.1.5 lib/bivouac/template/generate/scaffold_controller_view.rb
bivouac-0.1.6 lib/bivouac/template/generate/scaffold_controller_view.rb