Sha256: 7bfc0d6d688db0de86977770f6033675b81721d46ad5f268372c93b19fc4cacf
Contents?: true
Size: 1 KB
Versions: 13
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true # author: Vadim Shaveiko <@vshaveyko> # :nodoc: class RailsApiDoc::ApiDocsController < RailsApiDoc::ApplicationController class NewRecord < ActiveRecord::Base end def index # preload controllers for parameters to apply Dir.glob("#{Rails.root}/app/controllers/**/*.rb").each { |file| require_dependency file } @static_data = { types: RailsApiDoc::Controller::Parameter::Repository::Param::ACCEPTED_TYPES.map(&:to_s) } @request_repository = RailsApiDoc::Controller::Parameter::Repository @response_repository = RailsApiDoc::Controller::Response.repo end def create attributes = RailsApiDoc::Controller::AttributeParser.parse_attributes(permitted_params) end def destroy pry binding end def edit @api_record = NewRecord.new pry binding end def new @api_record = NewRecord.new pry binding end def update pry binding end private def permitted_params params.permit!(:name, :type, :enum) end end
Version data entries
13 entries across 13 versions & 1 rubygems