Hi guys.
I have a problem with access to ActiveRecord by component controller
basicly what I have is:
from outside view:
<%= render_component(:controller => ''webeditor/editor'',
:action =>
''show'',:params => {:editorName =>
''test''}) %>
now in component controler (components/webeditor/editor_controller.rb)
I want to do:
class Webeditor::EditorController < ApplicationController
uses_component_template_root
def show
@editor = Webeditor::Editor.find(:first,:conditions => ["editorName
= ''"+params[:editorName]+"''", params])
render(:layout => false)
end
end
and I''m getting:
NoMethodError in Webeditor/editor#show
undefined method `find'' for
Controllers::Webeditor::Editor:Dependencies::LoadingModule
RAILS_ROOT: ./script/../config/..
any idea?
--
Posted via http://www.ruby-forum.com/.