Sha256: 1b0b4a8539bf2f8652e6846a767482f5db91d947c84dbd5f723b22a2479481d8

Contents?: true

Size: 824 Bytes

Versions: 4

Compression:

Stored size: 824 Bytes

Contents

module TheComments
  class UserRoutes
    def call mapper, options = {}
      mapper.collection do
        mapper.get :manage
        mapper.get :my_comments

        mapper.get :my_draft
        mapper.get :my_published
        mapper.get :my_deleted
        mapper.get :my_spam

        mapper.get :draft
        mapper.get :published
        mapper.get :deleted
        mapper.get :spam
      end

      mapper.member do
        mapper.post   :to_spam
        mapper.post   :to_draft
        mapper.post   :to_published
        mapper.delete :to_deleted
      end
    end
  end

  class AdminRoutes
    def call mapper, options = {}
      mapper.collection do
        mapper.get :total_draft
        mapper.get :total_published
        mapper.get :total_deleted
        mapper.get :total_spam
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
fuck_comments-2.3.4 config/routes.rb
the_comments_ruby-2.3.4 config/routes.rb
the_comments_ruby-2.3.3 config/routes.rb
the_comments-2.3.1 config/routes.rb