help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
ruby-todo-list
/
app
/
controllers
/
api
/
v1
RSK World
ruby-todo-list
Ruby Todo List - Task Management with User Authentication + Categories + Search + File Attachments + Email Notifications + Rails MVC + Modern Web Interface + API Integration + Educational Design
v1
  • base_controller.rb1023 B
  • categories_controller.rb722 B
  • tasks_controller.rb2.1 KB
base_controller.rb
app/controllers/api/v1/base_controller.rb
Raw Download
Find: Go to:
# Ruby To-Do List Application - API Base Controller
# Created by: Molla Samser (help@rskworld.in, +91 93305 39277)
# Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
# Year: 2026

module Api
  module V1
    class BaseController < ApplicationController
      before_action :authenticate_user!

      rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
      rescue_from ActionController::ParameterMissing, with: :parameter_missing

      private

      def record_not_found
        render json: { error: 'Record not found' }, status: :not_found
      end

      def parameter_missing(error)
        render json: { error: error.message }, status: :bad_request
      end

      def render_success(data, status: :ok)
        render json: { success: true, data: data }, status: status
      end

      def render_error(message, status: :unprocessable_entity)
        render json: { success: false, error: message }, status: status
      end
    end
  end
end
33 lines•1023 B
ruby

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer