property_web_builder

https://github.com/etewiah/property_web_builder

Ruby

Create a fully featured real estate website on Rails in minutes! ⛺

Pwb::PageContent#as_json

if the page_content represents a rails_page_part, will return the page_part_key
else will return the raw html
def get_html_or_page_part_key
  if self.is_rails_part
    # page_part_key
    return page_part_key
  else
    return content.present? ? content.raw : nil
  end
end

Source | Google | Stack overflow

Edit

git clone [email protected]:etewiah/property_web_builder.git

cd property_web_builder

open app/models/pwb/page_content.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Pwb--PageContent-as_json-for-pr


# Commit to git

git add app/models/pwb/page_content.rbgit commit -m "better docs for Pwb::PageContent#as_json"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Pwb--PageContent-as_json-for-pr

hub pull-request


# Celebrate!