app/controllers/extensions_controller.rb
#
# POST /extensions
#
# Create an extension.
#
POST /extensions
Create an extension.
POST / extensions Create an extension .
def create
    eparams = params.require(:extension).permit(:name, :description, :github_url, :github_url_short, :tmp_source_file, :tag_tokens, :version, compatible_platforms: [])
    create_extension = CreateExtension.new(eparams, current_user)
    @extension = create_extension.process!
    if @extension.errors.none?
      redirect_to owner_scoped_extension_url(@extension), notice: t("extension.created")
    else
      @repo_names = current_user.octokit.repos.map { |r| r.to_h.slice(:full_name, :name, :description) } rescue []
      render :new
    end
  end
def create eparams = params . require ( :extension ) . permit ( :name , :description , :github_url , :github_url_short , :tmp_source_file , :tag_tokens , :version , compatible_platforms : [ ] ) create_extension = CreateExtension . new ( eparams , current_user ) @extension = create_extension . process! if @extension . errors . none? redirect_to owner_scoped_extension_url ( @extension ) , notice : t ( "extension.created" ) else @repo_names = current_user . octokit . repos . map { | r | r . to_h . slice ( :full_name , :name , :description ) } rescue [ ] render :new end end
POST /extensions
Create an extension.
POST / extensions Create an extension .