Overriding controllers

1 view
Skip to first unread message

kronos

unread,
Dec 8, 2009, 10:54:19 AM12/8/09
to adva-cms
It is very hard to understand how adva-cms works without
documentation :(. Anyway, I want to create a new section that is very
similar to blog and it name is "ideas" (I want that Idea model has a
link to blogs models (blog_id field or something like that and some
additional fields). So I go to admin and created one, selecting "blog"
type.
I understand how to customize views but what about controllers? The
url of ideas section is /ideas. I create controller ideas and put it
to app/controllers folder and write in routes.rb
"map.resources :ideas". But adva doesn't look at the controller and
use own that located in vendor/plugins/adva_blog/app/controllers/
blog_articles_controller.rb.

What I am doing wrong?

Marko Seppä

unread,
Dec 8, 2009, 11:06:16 AM12/8/09
to adva...@googlegroups.com
Hi Kronos,

to override blog article controller you have to create controllers/
blog_articles_controller.rb to your app folder. You can check how
other adva-cms engines have been built for reference, if you really
need to create a new section type.

Hope this helps,

-- Marko
> --
>
> You received this message because you are subscribed to the Google
> Groups "adva-cms" group.
> To post to this group, send email to adva...@googlegroups.com.
> To unsubscribe from this group, send email to adva-cms+u...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/adva-cms?hl=en
> .
>
>

kronos

unread,
Dec 9, 2009, 8:46:28 AM12/9/09
to adva-cms
Thanks.
Reply all
Reply to author
Forward
0 new messages