simple_cells 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/app/helpers/simple_cells/views_helper.rb +1 -1
- data/lib/simple_cells/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 993eacf9178c60f36e0129999b6b9cde11a2bf0d
|
4
|
+
data.tar.gz: d09dcb47aba5bacd963fac20699cb9c2b4024c7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c4ad9c24f463a0bdf43912225d9ae792466ceb8647c65ab593dbd217d0764c91c3eb0fcbd5bc6a0f68d67bcca2f9bc46330acb4db17f62863d0e803e3860353
|
7
|
+
data.tar.gz: db0767bd42b0e7534a99fc8185fb934a3faeb4e6a3203348adb331061facc2ee56b64eca985afda2cfc8619b37c7ae3032923ff6deddebd231f74ea6a2181e50
|
data/README.md
CHANGED
@@ -40,6 +40,19 @@ You can now render it like this from another ERB file:
|
|
40
40
|
<%= render_simple_cell :users, :my_action, my_variable: "Test" %>
|
41
41
|
```
|
42
42
|
|
43
|
+
Check if a variable has been given:
|
44
|
+
```ruby
|
45
|
+
class MyCell < SimpleCells::BaseCell
|
46
|
+
def my_method
|
47
|
+
if simple_cell_argument?
|
48
|
+
puts "Variable has been given"
|
49
|
+
else
|
50
|
+
puts "Variable has not been given"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
43
56
|
## License
|
44
57
|
|
45
58
|
This project rocks and uses MIT-LICENSE.
|
@@ -3,7 +3,7 @@ module SimpleCells::ViewsHelper
|
|
3
3
|
cell_class_name = StringCases.snake_to_camel(cell_name)
|
4
4
|
cell_class_name << "SimpleCell"
|
5
5
|
|
6
|
-
cell_file_path = Rails.root.join("app", "simple_cells", "#{cell_name}_simple_cell")
|
6
|
+
cell_file_path = Rails.root.join("app", "simple_cells", "#{cell_name}_simple_cell").to_s
|
7
7
|
|
8
8
|
require cell_file_path
|
9
9
|
|
data/lib/simple_cells/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_cells
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
208
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.
|
209
|
+
rubygems_version: 2.4.0
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: An attempt at writing a very simple cells gem.
|