# Andy Rails Toolbox [![Gem Version](https://badge.fury.io/rb/andy_rails_toolbox.svg)](http://badge.fury.io/rb/andy_rails_toolbox) Andy Rails Toolbox includes many useful helpers for rails development. ## Installation Add this line to your application's Gemfile: ```ruby gem 'andy_rails_toolbox' ``` And then execute: $ bundle Or install it yourself as: $ gem install andy_rails_toolbox ## Usage #### BootstrapHelper Bootstrap Homepage: http://getbootstrap.com/ Add below codes to layout `app/views/layout/application.html.erb` ``` erb ... <%= stylesheet_link_tag '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css' %> ... <%= javascript_include_tag '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js' %> ... ``` Examples ICONS ``` ruby bs_icon 'user' # => ``` BUTTONS ``` ruby link_button 'link_label', '/' # => link_label link_button 'link_label', '/', color: 'primary' # => link_label link_button 'link_label', '/', size: 'sm' # => link_label link_button 'link_label', '/', block: true # => link_label link_button 'link_label', '/', active: true # => link_label link_button 'link_label', '/', disabled: true # => link_label link_button 'link-button', '/', class: 'preset-class' # => link_label link_button 'link-button', '/', label_hidden: 'xs' # => link_label link_button 'link_label', '/', icon: 'user' # => link_label button 'button' # => submit_button 'submit' # => reset_button 'reset' # => ``` IMAGES ``` ruby image_responsive 'pic.png' # => image_rounded 'pic.png' # => image_circle 'pic.png' # => image_thumbnail 'pic.png' # => ``` #### MarkdownHelper New a css erb file `app/assets/stylesheets/pygments.css.erb` for pygments color style ``` erb <%= Pygments.css(style: "igor") %> ``` All styles: ``` sh $ rails c # => Loading development environment (Rails 4.2.0) irb(main):001:0> require 'pygments.rb' # => true irb(main):002:0> Pygments.styles # => ["manni", "igor", "xcode", "vim", "autumn", "vs", "rrt", "native", "perldoc", "borland", "tango", "emacs", "friendly", "monokai", "paraiso-dark", "colorful", "murphy", "bw", "pastie", "paraiso-light", "trac", "default", "fruity"] ``` Examples ``` ruby markdown '# h1' # =>