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
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
ruby-calculator
/
app
/
controllers
RSK World
ruby-calculator
Ruby Calculator Pro - Interactive Calculator with 8 Types + Mathematical Functions + Rails MVC + Modern Web Interface + API Integration + Educational Design
controllers
  • advanced_calculator_controller.rb11.8 KB
  • calculator_controller.rb3.6 KB
  • converter_controller.rb3.4 KB
  • favorites_controller.rb2.9 KB
  • theme_controller.rb1.2 KB
system.gotheme_controller.rb
app/controllers/theme_controller.rb
Raw Download
Find: Go to:
# Ruby Calculator - Interactive calculator built with Ruby on Rails
# Author: RSK World (Molla Samser, Founder | Rima Khatun, Designer & Tester)
# Contact: help@rskworld.in | +91 93305 39277
# Website: https://rskworld.in
# Year: 2026
# Description: Build a fully functional calculator using Ruby on Rails with modern UI

class ThemeController < ApplicationController
  def update
    theme_name = params[:theme]
    
    if Theme.names.include?(theme_name)
      session[:theme] = theme_name
      respond_to do |format|
        format.html { redirect_back(fallback_location: root_path) }
        format.json { render json: { theme: theme_name, css: Theme.generate_css(theme_name) } }
      end
    else
      respond_to do |format|
        format.html { redirect_back(fallback_location: root_path), alert: "Invalid theme" }
        format.json { render json: { error: "Invalid theme" }, status: :unprocessable_entity }
      end
    end
  end
  
  def current
    theme_name = session[:theme] || 'default'
    respond_to do |format|
      format.json { render json: { theme: theme_name, css: Theme.generate_css(theme_name) } }
    end
  end
end
33 lines•1.2 KB
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