Skip to content

zipline method not working from Grape API endpoint #106

@sra-wtag

Description

@sra-wtag

I am using Grape for some of my APIs. I am trying to implement an export API. Now I am getting an error like:
undefined method 'zipline' for #<Class:0x000000012385c270> in '/api/test/:id/export' endpoint

My API resource is:

class Test < Api
      # enable zipline
      include Zipline

      resource :test do
          get '/export' do
            files = JSON.parse Test.find(params[:id]).exportfiles
            zipline(files, "zip_file_name")
          end
      end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions