Sha256: 0f8408db02d77cea8dfcb970c3822b896f18d1d3b3a078db04874b4dba593d92

Contents?: true

Size: 380 Bytes

Versions: 4

Compression:

Stored size: 380 Bytes

Contents

module Happy
  module Extras

    class ResourceController < Happy::Controller
      def route
        on_get('new') { new }

        on :id do
          on_get         { show }
          on_post        { update }
          on_delete      { destroy }
          on_get('edit') { edit }
        end

        on_post { create }
        on_get  { index }
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
happy-0.1.0 lib/happy/extras/resource_controller.rb
happy-0.1.0.pre28 lib/happy/extras/resource_controller.rb
happy-0.1.0.pre27 lib/happy/extras/resource_controller.rb
happy-0.1.0.pre25 lib/happy/extras/resource_controller.rb