This is a News for WhiteKit
Add this line (or uncomment) to your WhiteKit's Gemfile:
gem 'whitekit_news'
And then execute:
$ bundle install
Then run
$ rails g whitekit_news
And then
$ rake db:migrate
Then you need add (or uncomment) routes for news in routes.rb
resources :news, only: [:index, :show] do
get 'page/:page', action: :index, on: :collection
end
Now page with news available at
/news
In admin part you can add, edit and remove news
This gem also creates component of news. You can add it in to the block. The component of news takes some params.
Example default
count: 5,
title_length: 50,
content_length: 200,
content_view: true,
date_view: true,
type: :latest
- Fork it
- 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