Check in page has any children in Ruby

Member

vivien_maggio

by vivien_maggio , in category: Ruby , 2 months ago

Check in page has any children in Ruby

1
2
3
4
5
6
def has_children_pages(id)
  unless Page.where(:parent_id => id, :public => true).blank?      
    return true
  end      
  return false
end


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

no answers