A Rails Engine for BBS(Bulletin Board System).
Add this line to your application's Gemfile:
gem 'bbs'And then execute:
$ bundleOr install it yourself as:
$ gem install bbs$ bin/rails bbs:install:migrationsEdit config/routes.rb:
Rails.application.routes.draw do
mount Bbs::Engine => '/bbs' # choose your mount point arbitrarily
end$ bin/rails g bbs:configExecute the above command will copy following files into your
config/initializers.
- config/initializers/bbs.rb
- config/locales/bbs.ja.yml
- config/locales/bbs.en.yml
$ rails g active_record:bbs UserExecute the above command will generate models(User, UserProfile and Avatar) and its migrations.
Uncomment bbs config and specify user model name arbitrary.
config.user_class = 'User'Component that list all categories. In view, you have to call the cell object:
= cell('bbs/category')Component that list latest topics. In view, you have to call the cell object:
= cell('bbs/latest_topics')To change the number of displayed topics, change the value config.latest_topics_count in config/initializers/bbs.rb (The default is 10).
If you want to customize bbs views, you can copy view templates provided by this gem using generator.
$ bin/rails g bbs:viewsExecute the above command will copy view templates to app/views/bbs/.
- Fork it ( http://github.com/bm-sms/bbs )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
The gem is available as open source under the terms of the MIT License.