class Admin::ResourceController
def set_owner_or_editor
def set_owner_or_editor if model.has_attribute? :created_by_id model.created_by_id = current_user.id if model.id == nil model.updated_by_id = current_user.id end end
def set_owner_or_editor if model.has_attribute? :created_by_id model.created_by_id = current_user.id if model.id == nil model.updated_by_id = current_user.id end end