Added conditions to resource to play along with activerecord resources.