README.md in andy_rails_toolbox-1.0.1 vs README.md in andy_rails_toolbox-1.1.0
- old
+ new
@@ -1,6 +1,6 @@
-# Andy Rails Toolbox
+# 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
@@ -37,18 +37,18 @@
Examples
ICONS
-``` rb
+``` ruby
bs_icon 'user'
# => <span class="glyphicon glyphicon-user"></span>
```
BUTTONS
-``` rb
+``` ruby
html_button 'button'
# => <button name="button" type="button" class="btn btn-default">button</button>
html_button 'button', color: 'primary'
# => <button name="button" type="button" class="btn btn-primary">button</button>
html_button 'button', size: 'sm'
@@ -71,11 +71,11 @@
# => <input type="submit" name="commit" value="input button" class="btn btn-default" />
```
IMAGES
-``` rb
+``` ruby
image_responsive 'pic.png'
# => <img class="img-responsive" src="/images/pic.png" alt="Pic" />
image_rounded 'pic.png'
# => <img class="img-rounded" src="/images/pic.png" alt="Pic" />
image_circle 'pic.png'
@@ -103,11 +103,11 @@
# => ["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
-``` rb
+``` ruby
markdown '# h1'
# => <h1>h1</h1>
markdown '## h2'
# => <h2>h2</h2>
markdown '[an example](http://example.com/)'
@@ -116,37 +116,38 @@
# => transform markdown code to html codes and payments highlighter
```
#### QrcodeHelper Examples
-``` rb
+``` ruby
qrcode 'Hello world!'
```
<img alt="Hello world!" src="https://chart.googleapis.com/chart?cht=qr&chl=Hello world!&chs=200x200" />
QRCode options parameters: <a href="https://google-developers.appspot.com/chart/infographics/docs/qr_codes#overview" target="_blank">Here</a>
-``` rb
+``` ruby
qrcode 'Hello world!', width: '300', output_encoding: 'Shift_JIS', error_correction_level: 'H', margin: '10'
```
#### FontAwesomeHelper
Font Awesome icons Homepage: <a href="http://fortawesome.github.io/Font-Awesome/" target="_blank">http://fortawesome.github.io/Font-Awesome/</a>
-Add below codes to layout `app/views/layout/application.html.erb`
+In your `application.css`, include the css file:
-``` erb
-...
-<%= stylesheet_link_tag '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' %>
-...
+```css
+/*
+ *= require font-awesome
+ */
```
+Then restart your webserver if it was previously running
Examples
-``` rb
+``` ruby
fa_icon "user"
# => <i class="fa fa-user"></i>
fa_icon "user", text: "Login"
# => <i class="fa fa-user"></i> Login
@@ -158,11 +159,11 @@
# => <i class="fa fa-user fa-4x"></i>
```
#### HashHelper Examples
-``` rb
+``` ruby
options = { a: '1', b: '2', c: '3' }
get_value :a, options
# => '1'
get_value :d, options
@@ -192,10 +193,10 @@
...
```
Use in View
-``` rb
+``` ruby
timeago '2014-11-21 09:38:27.256503'
# => '2εζδΉε'
```
## Contributing