ok, i have a pretty almost finished (frontend) blog, i have defined an
admin zone with authentication to add content, now im getting trouble
with the views for the controllers in the admin zone, here you can see
my file structure:
http://img284.imageshack.us/my.php?image=tmpviews6oq.gif
and my admin controllers like this:
controllers/admin/admin_controller.rb
class Admin::AdminController < ApplicationController
...
end
controllers/admin/articles_controller.rb
class Admin::ArticlesController < Admin::AdminController
...
end
both works fine, the problem are the views, for example the
controllers/articles_controller.rb takes the view from
views/layouts/articles.rhtml no problem, so the
controllers/admin/articles_controller.rb should take the view from but
views/admin/layouts/articles.rhtml but isnt taking any view?? not from
there not from any place or folder in the admin view zone that i put the
articles.rhtml file.
but it does take the little files that are usually called from
@content_for_layout(show.rhtml, edit.rhtml, etc.) so i can add,delete,
edit items without problems(if i see the source html of the browser i
only see this part of htmlcode not a complete html page) but what is
happening, why arent taking a main view?
note: the problem its present on every controller that i create on the
admin zone, and when i create the admin/articles_controller.rb the
views/layouts/articles.rhtml(the frontend controller view) its
overwritten(why??).
well,i have been working on this for a while and now im clueless about
this, hope someone acn help with this, any help will be very apreciated.
:)
--
Posted via http://www.ruby-forum.com/.