vlado/rails_db_info
소개
Rails engine which will give you a quick display of your database schema and contents for reference
데이터 및 분석측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalRails database info

Adds an html endpoint to your Rails application which will give you a quick display of your database schema and contents for reference at http://localhost:3000/rails/info/db


Install
Add this to the development group in your Gemfile
group :development do
gem 'rails_db_info'
end
Run bundle install
Visit http://localhost:3000/rails/info/db and you will see your database schema and values.
For users of catch-all routes
If (and only if) you have catch all routes like get '*path' => 'your_controller#your_action' in your app already, you can manually add rails_db_info to your routes (config/routes.rb) before the catch-all routes like this.
if Rails.env.development?
mount_rails_db_info as: 'rails_db_info_engine'
# mount_rails_db_info is enough for rails version < 4
end
get '*path' => 'your_controller#your_action'
Why?
I was using Annotate to annotate my models with schema info. When I saw Sextant I got an idea to create something similar for database and the rest is history :)
Todo / Ideas
- Improve CSS
- Add small bar (like miniprofiler has) at top of the page or add key listener(s). When triggered it would show database info. For example you are working on UsersController and when you press Cmd+D users table info slides down.
- Generator to copy assets in case asset pipeline is disabled
Contributions welcome :)
Contributing
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Added some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Running tests
$ RAILS_ENV=test bundle exec rake db:migrate
$ bundle exec rake
To run tests for specific rails version use custom Gemfile from gemfiles folder
$ BUNDLE_GEMFILE=gemfiles/rails_3-2-stable.gemfile bundle install
$ BUNDLE_GEMFILE=gemfiles/rails_3-2-stable.gemfile bundle exec rake
License
This project rocks and uses MIT-LICENSE.
관련 프로젝트 살펴보기
불러오는 중…