NsSettingsUi
Installation
Add this line to your application's Gemfile:
gem 'ns_settings_ui'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ns_settings_ui
Install migrations:
$ rake ns_settings_ui:install:migrations
And run db:migrate in your application
$ rake db:migate
Configuration
Add ns_setting_ui initializer to config/initializers/ns_settings_ui.rb
if defined?(NsSettingsUi)
NsSettingsUi.layout = nil
NsSettingsUi.parent_controller = ActionController::Base
end
You can modify NsSettingsUi variables in order to:
NsSettingsUi.layout
- set a layout from your applicationNsSettingsUi.parent_controller
- choose a controller that NsSettingUi controllers will inherit from
Rails support
Rails 4.2 since ver 1.1, dropped in 1.5 Rails 5.0 since ver 1.2 Rails 5.2 since ver 1.5 Rails 6.0 since ver 1.6 Rails 6.1 since ver 1.7.0
Testing
This engine is used by NTTR and socialguide.
It uses Appraisal gem with a set up similar to permitters gem to give you an easy way of testing the code under multiple Rails versions.
To bundle install for each appraisal defined:
bundle appraisal install
And then to run specs for all the appraisals:
bundle exec appraisal rspec spec
Or a specific one:
bundle exec appraisal rails_5.0 rspec spec
Contributing
- Fork it ( http://github.com/
/ns_settings_ui/fork ) - 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