property_web_builder

https://github.com/etewiah/property_web_builder

Ruby

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

Pwb::Seeder.seed_website

def seed_sections yml_file
  sections_yml = load_seed_yml yml_file
  sections_yml.each do |single_section_yml|
    unless Pwb::Section.where(link_key: single_section_yml['link_key']).count > 0
      Pwb::Section.create!(single_section_yml)
    end
  end
end

Source | Google | Stack overflow

Edit

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

cd property_web_builder

open lib/pwb/seeder.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Pwb--Seeder-seed_website-for-pr


# Commit to git

git add lib/pwb/seeder.rbgit commit -m "better docs for Pwb::Seeder.seed_website"


# 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--Seeder-seed_website-for-pr

hub pull-request


# Celebrate!