Sha256: b2c68d006a04df2f353d74f0c3248e7b54685b5083824c1bc3147a3888d5cea1

Contents?: true

Size: 1.83 KB

Versions: 1

Compression:

Stored size: 1.83 KB

Contents

# Buildybuild

Buildybuild is a rails generator that gives you everything you need to create a cms.

## Installation

Add this line to your application's Gemfile:

```bash
$ gem 'buildybuild'
```

And then execute:

```bash
$ bundle
```

Or install it yourself as:

```bash
$ gem install buildybuild
```

**Note:** There are runtime dependencies in Buildybuild so you'll have to add the following if buildybuild is not in your Gemfile:

```ruby
  gem 'decent_exposure', '2.0.0.rc1'
  gem 'haml-rails'
  gem 'formal'
  gem 'rdiscount'
```

## Usage

This is a rails generator so run the following command:

```bash
$ rails generate buildybuild:cms 

# you can pass a name for the generated resource. Default is "page" i.e.:

$ rails generate buildybuild:cms static_page
```


This will create the following files:

- app/models/page.rb
- db/migrate/[timestamp]\_create\_pages.rb
- app/controllers/pages\_controller.rb
- app/views/pages/new.html.haml
- app/views/pages/edit.html.haml
- app/views/pages/show.html.haml
- app/views/pages/\_form.html.haml

and appends the following to the bottom of your routes file:

```ruby
  resources :pages, only: [:new, :create]

    #keep these at the bottom of your file. They should be the last routes.
    get "/:slug", to: "pages#show", as: :slug
    get "/:slug/edit", to: "pages#edit", as: :edit_slug
    put "/:slug", to: "pages#update", as: :slug
    post "/:slug", to: "pages#destroy", as: :slug
```

### Next

run the migration

```bash
rake db:migrate
```

And you're set. Now you can go to "http://localhost:3000/pages/new" and see your new Content Management System in action!
      
## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
buildybuild-0.0.1 README.md