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: ea4e0afe260da5eec24621e4bd92dd33be8324b1
4
- data.tar.gz: e227a16664cc72ad69259e5a0e70344d30744e29
3
+ metadata.gz: 0f14f26a1c9efefc34c8d33c4de1d1a41b77cb89
4
+ data.tar.gz: 6fed5c4f46ac45db3a75d52e0f30a3f3dc8e6d13
5
5
  SHA512:
6
- metadata.gz: eadee2671a17f880efdb5b007b35156a4180e3b62cc5a36416bc02dfc867df4cc7609c809e1166730ae5b59214f900628ae1585bd85d351972654b65617aed72
7
- data.tar.gz: bd245387e4eb295aa3f3f482f0a8bb37a93af756437c2a3e74809d1ef9df6d88d3f17ec1c7c50a2eecd26f0569a7cc2bdd27e70d49bc9ea23ddb4ce6c68134f5
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
- # The DOM class set for index_for tag. Default is nil
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 body call. Default is :tbody.
13
- # config.body_tag = :ul
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
- # The tag which wraps each head column call. Default is :th.
16
- # config.head_column_tag = :li
13
+ # config.table_body_tag = :tbody
14
+ # config.table_body_class = nil
17
15
 
18
- # The tag which wraps each body column call. Default is :td.
19
- # config.body_column_tag = :li
16
+ # config.table_row_tag = :tr
17
+ # config.table_row_class = nil
20
18
 
21
- # The tag which wraps each row call. Default is :tr.
22
- # config.row_tag = :p
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
@@ -1,3 +1,3 @@
1
1
  module IndexFor
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-07-17 00:00:00.000000000 Z
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