index_for 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f14f26a1c9efefc34c8d33c4de1d1a41b77cb89
|
4
|
+
data.tar.gz: 6fed5c4f46ac45db3a75d52e0f30a3f3dc8e6d13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f191d29aa8344e4a125235730fe14ce5fadbdc22ae744a6f319d64a9e630c17956d8755df6c6f72692334ebf28a52796f1ccebfa479b25db8f814864b151588a
|
7
|
+
data.tar.gz: 0858423aebf41a38831d7ec4ed2a93c64e55b89edeabac7ff541d8a576f06d7a93cc270a6d0eaad45bfb5e5d1f7bd36e68c6b3d559fd9d47b920dc32bb8c47be
|
@@ -0,0 +1,7 @@
|
|
1
|
+
= index_for(@<%= plural_name %>) do |i|
|
2
|
+
<%- attributes.each do |attribute| -%>
|
3
|
+
= i.<%= attribute.reference? ? :association : :attribute %> :<%= attribute.name %>
|
4
|
+
<% end -%>
|
5
|
+
= i.actions :all
|
6
|
+
|
7
|
+
= link_to 'New', new_<%= singular_name %>_path(@<%= singular_name %>)
|
@@ -1,24 +1,59 @@
|
|
1
1
|
# Use this setup block to configure all options available in IndexFor.
|
2
2
|
IndexFor.setup do |config|
|
3
|
-
# The tag which wraps index_for calls.
|
4
|
-
# config.index_for_tag = :div
|
5
3
|
|
6
|
-
#
|
7
|
-
# config.index_for_class = :custom
|
8
|
-
|
9
|
-
# The tag which wraps header call. Default is :thead, set nil to turn off header.
|
10
|
-
# config.head_tag = nil
|
4
|
+
# IndexFor
|
11
5
|
|
12
|
-
# The tag which wraps
|
13
|
-
# config.
|
6
|
+
# # The tag which wraps index_for calls.
|
7
|
+
# config.table_tag = :table
|
8
|
+
# config.table_class = nil
|
9
|
+
|
10
|
+
# config.table_head_tag = :thead
|
11
|
+
# config.table_head_class = nil
|
14
12
|
|
15
|
-
#
|
16
|
-
# config.
|
13
|
+
# config.table_body_tag = :tbody
|
14
|
+
# config.table_body_class = nil
|
17
15
|
|
18
|
-
#
|
19
|
-
# config.
|
16
|
+
# config.table_row_tag = :tr
|
17
|
+
# config.table_row_class = nil
|
20
18
|
|
21
|
-
#
|
22
|
-
# config.
|
19
|
+
# config.table_head_cell_tag = :th
|
20
|
+
# config.table_head_cell_class = nil
|
23
21
|
|
22
|
+
# config.table_body_cell_tag = :td
|
23
|
+
# config.table_body_cell_class = nil
|
24
|
+
|
25
|
+
# # The classname for actions cells.
|
26
|
+
# config.table_actions_cell_class = :actions
|
27
|
+
|
28
|
+
# config.action_link_class = :action
|
29
|
+
|
30
|
+
# ShowFor
|
31
|
+
|
32
|
+
# # The tag which wraps show_for calls.
|
33
|
+
# config.list_tag = :dl
|
34
|
+
# config.list_class = nil
|
35
|
+
|
36
|
+
# config.list_row_tag = nil
|
37
|
+
# config.list_row_class = nil
|
38
|
+
|
39
|
+
# config.list_label_tag = :dt
|
40
|
+
# config.list_label_class = nil
|
41
|
+
|
42
|
+
# config.list_content_tag = :dd
|
43
|
+
# config.list_content_class = nil
|
44
|
+
|
45
|
+
# config.list_label_proc = nil
|
46
|
+
|
47
|
+
# config.blank_content_class = "blank"
|
48
|
+
|
49
|
+
# # The default time format for I18n.
|
50
|
+
# config.i18n_format = :default
|
51
|
+
|
52
|
+
# # The methods which used for displaying the associations.
|
53
|
+
# config.association_methods = [ :name, :title, :to_s ]
|
54
|
+
|
55
|
+
# # The tag which wraps the collections.
|
56
|
+
# config.collection_tag = :ul
|
57
|
+
# config.collection_column_tag = :li
|
58
|
+
|
24
59
|
end
|
data/lib/index_for/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: index_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- lib/generators/index_for/templates/en.yml
|
112
112
|
- lib/generators/index_for/templates/index.html.erb
|
113
113
|
- lib/generators/index_for/templates/index.html.haml
|
114
|
+
- lib/generators/index_for/templates/index.html.slim
|
114
115
|
- lib/generators/index_for/templates/index_for.rb
|
115
116
|
- lib/index_for.rb
|
116
117
|
- lib/index_for/attribute.rb
|