开发者

How do i access another engines model?

I have created a custom engine in Refinery and its working fine. I've created a partial view called 'Showcase" in the views folder for this model. I'd like to be able to display that partial in my homepage of the main site.

The model is called projects, and I included the line:

<%= render :partial => "projects/showcase" %>

It didnt like this, keeps saying there are no such methods for my @projects model. It's finding the page, but refuses to accept @projects is something i can play with. I have tried running this partial off the index page in the projects engine itself and it works fine. It must have something to do with me calling it from another place in the project.

I also tried:

<%= render :partial => "projects/showcase" :collection => @projects %>

and

<%= render :partial => "projects/showcase" :object => @projects %>

which didn't return me any different results.

Appreciate your h开发者_开发问答elp!


You are setting @projects in the proper method of your homepage controller, right?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜