Topic: uninitialized constant ImobsController::Imob Error
Im new programming on Ruby on Rails.
I'm trying to create a very simple form but I'm getting the error uninitialized constant ImobsController::Imob. I've already read other similar topics but I couldn't fix my situation.
Any help is welcome.
imobs_controller.rb
class ImobsController < ApplicationController
def new
@imobs=Imob.new
end
def create
@imobs=Imob.new(:params[:tipologia])
if @imobs.save
redirect_to new_imobs_path
end
end
end
routes.rb
Imobiliaria::Application.routes.draw do
resources :imobs
root :to => 'home#index'
end
Thanks a lot ![]()
Last edited by rmonica (2013-01-07 20:11:47)