/ Published in: Rails
@qtext does not become available in the view. however, this code has worked inside the view.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
class KnoskController < ApplicationController def ask # sets and formats the question # if one has been posted @qtext = params[:question][:qtext] if @qtext then @qtext.capitalize! @qtext.gsub!(" i ", " I ") if !@qtext.rindex("?") then @qtext << "?" end # adds the question to the database # if one was posted here end def search end def answer end def about end def options end end
URL: www.knosk.com