I want to use Resque in a Ruby on Rails application. I have no need for a relational database nor do I plan to store anything. I just want to use Resque.
How do I configure this application?
I did this:
Empty config/database.yml
In config/application.rb
#require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"
And removed the < ActiveRecord::Base in my models.
But I get errors here:
class ProjectController < ApplicationController
def index
@project = Project.new
end
end
=simple_form_for @project do |f|
=f.input :scene, :label => 'Scene'
=f.submit
ActionView::Template::Error:
undefined method `model_name' for Project:Class
How can I do this?
Make your model inherit from ActiveResource::Base instead:
That will provide the methods required by helpers such as
form_forwithout the need to use ActiveRecord.