simply_load 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README CHANGED
@@ -13,7 +13,7 @@ The run:
13
13
 
14
14
  bundle install
15
15
 
16
- As simply_load uses some javascript files, you will require to install them for use:
16
+ As simply_load uses a javascript files, you will be required to install it for use (also remember to include it with javascript_include_tag):
17
17
 
18
18
  rails g simply_load
19
19
 
@@ -1,3 +1,3 @@
1
1
  module SimplyLoad
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/simply_load.rb CHANGED
@@ -2,7 +2,17 @@ require "simply_load/version"
2
2
 
3
3
  module SimplyLoad
4
4
 
5
- class SimplyLoad < Rails::Engine
6
- end
5
+ def simply_load(url, content_or_options_with_block = nil, options = {}, escape = true, &block)
6
+ options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash) and block_given?
7
+ options[:class] = "#{options[:class]} simply_load".strip
8
+ options.merge!(:"data-href" => url)
9
+ if block_given?
10
+ content_tag :div, capture(&block), options, escape
11
+ else
12
+ content_tag :div, content_or_options_with_block, options, escape
13
+ end
14
+ end
7
15
 
8
- end
16
+ end
17
+
18
+ ActionView::Base.send(:include, SimplyLoad)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: simply_load
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Firebait
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-13 00:00:00 Z
13
+ date: 2011-07-14 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jquery-rails
@@ -37,7 +37,6 @@ files:
37
37
  - Gemfile
38
38
  - README
39
39
  - Rakefile
40
- - app/helpers/simply_load_helper.rb
41
40
  - lib/generators/simply_load/USAGE
42
41
  - lib/generators/simply_load/simply_load_generator.rb
43
42
  - lib/generators/simply_load/templates/simply_load.js
@@ -1,14 +0,0 @@
1
- module SimplyLoadHelper
2
-
3
- def simply_load(url, content_or_options_with_block = nil, options = {}, escape = true, &block)
4
- options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash) and block_given?
5
- options[:class] = "#{options[:class]} simply_load".strip
6
- options.merge!(:"data-href" => url)
7
- if block_given?
8
- content_tag :div, capture(&block), options, escape
9
- else
10
- content_tag :div, content_or_options_with_block, options, escape
11
- end
12
- end
13
-
14
- end