-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
Signed-off-by: Yehuda Katz <wycats@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello world! |
3 comments
on commit 09de34c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the magic here seems to be that you don't really need a controller if you are using all restful actions. You could create a RESTcontroller < ApplictionController and have your PersonController < RESTController. Have your RESTcontroller have all your default rest actions and use @obj instead of @person and @options instead of options and set those with a before filter. Then, in your PersonController, just define the methods and away you go.
At least, that's a potential I see. I could be missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a typo. Thanks!
And about your second comment, you are right too. Check this: http://github.com/josevalim/inherited_resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, but how would one use this along with options to the to_xml or to_json method for the model?
looks like a typo. probably wanting @people and not @person