css_grid 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -170,6 +170,21 @@ Note that 'prepend' accept negative values
170
170
  </div>
171
171
  ```
172
172
 
173
+ --
174
+
175
+ You can use the 'element' option to specify the html element wich will be created
176
+
177
+ ```erb
178
+ <%= container :element=>:header do %>
179
+ <!-- some html -->
180
+ <% end %>
181
+ ```
182
+
183
+ ```html
184
+ <header class="container">
185
+ <!-- some html -->
186
+ </header>
187
+ ```
173
188
 
174
189
  --
175
190
 
@@ -286,7 +301,7 @@ Shortcuts :
286
301
 
287
302
  Examples :
288
303
  ```erb
289
- <%= three_cols_container :collection=>@collection, :rows=>{:id => Proc.new{ |elt| elt[:name].downcase }} do |elt| %>
304
+ <%= three_cols_container :collection=>@collection, :spans=>{:id => Proc.new{ |elt| elt[:name].downcase }} do |elt| %>
290
305
  <%= four_span do %>
291
306
  Class : <%= elt[:name] %><br/>
292
307
  Detail : <%= elt[:methods] %>
@@ -296,8 +311,8 @@ Examples :
296
311
 
297
312
  ```html
298
313
  <section class="container " id="nested">
299
- <div class="row " id="enumerable">
300
- <div class="four_span ">
314
+ <div class="row ">
315
+ <div class="four_span " id="enumerable">
301
316
  Class : Enumerable<br/>
302
317
  Detail : 163 methods
303
318
  </div>
@@ -614,6 +629,18 @@ Today this variable looks like this
614
629
 
615
630
  Need to test it with the most commons versions of grid stylesheets (twitter bootstrap for example) and provide correct config variable.
616
631
 
632
+ --
633
+
634
+ Add option to insert specified attributes in tags. Like 'itemprop', 'itemscope' or personal attribute, 'data-remote' for me ;)
635
+
636
+ --
637
+
638
+ Preprend and Append are not fully handled by the GRID_CONFIG constant. Specialy prepend negative values.
639
+
640
+ --
641
+
642
+ Add ArgumentErrors in helpers.
643
+
617
644
  ## Contributing
618
645
 
619
646
  1. Fork it
data/lib/assets/.DS_Store CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  module CssGrid
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.0"
3
3
  end
data/lib/css_grid.rb CHANGED
@@ -43,7 +43,7 @@ module GridHelper
43
43
  content_class << "#{ GRID_CONFIG[:classes][:append] }_#{ append }" if append
44
44
  content_class << GRID_CONFIG[:classes][:nested] if options.delete(:nested)
45
45
 
46
- safe_buffer = content_tag(GRID_CONFIG[:elements][tag], nil, :id => options.delete(:id), :class => content_class.join(" ") , &block)
46
+ safe_buffer = content_tag(options.delete(:element) || GRID_CONFIG[:elements][tag], nil, :id => options.delete(:id), :class => content_class.join(" ") , &block)
47
47
 
48
48
  @nested_stack.pop if unstack
49
49
  safe_buffer
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css_grid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-14 00:00:00.000000000 Z
12
+ date: 2012-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties