Closed inossidabile closed 11 years ago
given
resources :blogs do
resources :posts do
resources :comments
end
end
namespace 'admin' do
resources :blogs do
resources :comments
end
end
will generate following resources:
class Blog extends Joosy.Resource.REST
@entity 'blog'
class Post extends Joosy.Resource.REST
@entity 'post'
class Comment extends Joosy.Resource.REST
@entity 'comment'
class Blog.Post extends Post
@source '/blogs/:blog_id/posts'
class Blog.Post.Comment extends Comment
@source '/blogs/:blog_id/posts/:post_id/comments'
class Admin.Blog extends Blog
@source '/admin/blogs'
class Admin.Blog.Comment extends Comment
@source '/admin/blogs/:blog_id/comments'
Like I mentioned at corresponding issue of core repo (https://github.com/joosy/joosy/issues/106) – the question here is how are we going to switch between variations of Blog
resource. To make it real we have to add ability to override @source
on the instance level and make @on
to make exactly that. Right?
yes, exactly. but with @at
instead of @on
:-)
yea lol. What a funny typo :)
Expected to fix https://github.com/joosy/joosy/issues/80