rudsl_rails 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -6
- data/lib/rudsl_rails/version.rb +1 -1
- data/rudsl_rails.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b404445f40aecc2597d17f8343176ec8205412a4
|
4
|
+
data.tar.gz: 8277e0aa2fedb5905d8e606e8f15b82ca6e4d47c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a4bae32d55cd250b9dc1613f240034859ee2441c6ac8f4454a94ab4e07c2f12a33feea41d4dde4093cdb1360d5f556792558fa7499d49df16437ec727176322
|
7
|
+
data.tar.gz: f685221e2ecda263469c708412dabb6ee6993a0054a20c5cd5679dfe2a5f7a0b803f43e012a2f6aacd0928f84d547967a0a56417dd84ae08d07398a92f785c52
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# RudslRails
|
2
2
|
|
3
|
-
|
3
|
+
rudsl_rails makes it easier to use rudsl in your Rails project. The recommended organisation of your rudsl views are into cards that can be rendered directly, or as part of an non-rudsl view.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -14,17 +14,45 @@ And then execute:
|
|
14
14
|
|
15
15
|
$ bundle
|
16
16
|
|
17
|
-
|
17
|
+
## Usage
|
18
18
|
|
19
|
-
|
19
|
+
The gem provides a generator to help organise the cards. Run
|
20
20
|
|
21
|
-
|
21
|
+
```ruby
|
22
|
+
rails generate rudsl_card users/profile
|
23
|
+
```
|
24
|
+
|
25
|
+
This will generate a new card in `app/cards/users/` called `profile_card.rb` which can be used as follows:
|
22
26
|
|
23
|
-
|
27
|
+
```ruby
|
28
|
+
render html: Users::ProfileCard.new(current_user).html
|
29
|
+
```
|
30
|
+
|
31
|
+
assuming, that the `profile_card.rb` looks as follows:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
class Users:ProfileCard < RudslRails::Card
|
35
|
+
attr_reader :user
|
36
|
+
|
37
|
+
def initialize(user)
|
38
|
+
@user = user
|
39
|
+
end
|
40
|
+
|
41
|
+
def node
|
42
|
+
div class: 'profile-card' do
|
43
|
+
h3 user.name
|
44
|
+
img src: user.photo.url, class: 'responsive-image'
|
45
|
+
p do
|
46
|
+
user.bio
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
```
|
24
52
|
|
25
53
|
## Contributing
|
26
54
|
|
27
|
-
1. Fork it ( https://github.com/
|
55
|
+
1. Fork it ( https://github.com/sparkymat/rudsl_rails/fork )
|
28
56
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
57
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
58
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/rudsl_rails/version.rb
CHANGED
data/rudsl_rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rudsl_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ajith Hussain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.0.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.0.1
|
69
69
|
description: rudsl_rails helps organise your Rails views written in rudsl, through
|
70
70
|
cards.
|
71
71
|
email:
|