title: Getting values from Rails database to use in Ruby file
body: <p>I have a page that takes user input in a form and saves it to a database in rails. I now need to use those input values in a ruby application I wrote and placed in /lib/, which will generate some new values that I need to store in another database to return it to elements on my page. </p>
  
  <p>I currently have the ruby application taking values from a prompt then using the gets.chomp method, this is just a placeholder until I learn how to use the stored values. </p>
  
  <p>I'm new to back-end programming but here's my controller that I'm using to store the inputs:</p>
  
  <p><strong>colours_controller.rb</strong></p>
  
  <pre><code>class ColoursController &lt; ApplicationController
    def home
      @colour = Colour.new
    end
    def create
      @colour = Colour.new(colour_params)
      if @colour.save
        redirect_to root_path
      else
        redirect_to root_path, notice: "Error."
      end
    end
    private
    def colour_params
      params.require(:colour).permit(:hue, :sat, :luma, :number)
    end
  end
  </code></pre>