building-blocks 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -5
- data/VERSION +1 -1
- data/lib/building_blocks/base.rb +2 -1
- metadata +18 -4
data/README.rdoc
CHANGED
@@ -148,11 +148,11 @@ Then, in a specific view that is rendered using this layout, you can add stylesh
|
|
148
148
|
<% end %>
|
149
149
|
|
150
150
|
<% blocks.before :javascripts do %>
|
151
|
-
<%= javascript_include_tag "
|
151
|
+
<%= javascript_include_tag "before_javascripts" %>
|
152
152
|
<% end %>
|
153
153
|
|
154
154
|
<% blocks.after :javascripts do %>
|
155
|
-
<%= javascript_include_tag "
|
155
|
+
<%= javascript_include_tag "after_javascripts" %>
|
156
156
|
<% end %>
|
157
157
|
|
158
158
|
<!--
|
@@ -222,11 +222,16 @@ The most advanced feature of BuildingBlocks is the ability to utilize it for tem
|
|
222
222
|
|
223
223
|
As an example, consider {table-for}[https://github.com/hunterae/table-for], a library that was written with minimal codes that provides its user with a very nice, easy-to-use table builder. A sample usage might look something like:
|
224
224
|
|
225
|
-
<%= table_for @users
|
226
|
-
|
225
|
+
<%= table_for @users, :row_html => {:class => lambda { cycle('even', 'odd')},
|
226
|
+
:id => lambda {|user| "user-#{user.id}"}},
|
227
|
+
:sortable => true do |table| %>
|
228
|
+
<% table.column :edit %>
|
229
|
+
<% table.column :show %>
|
230
|
+
<% table.column :email, :label => "Email Address" %>
|
231
|
+
<% table.column :name, :header_html => {:style => "background-color:orange"} do |user| %>
|
227
232
|
<%= "#{user.first_name} #{user.last_name}" %>
|
228
233
|
<% end %>
|
229
|
-
<% table.column :
|
234
|
+
<% table.column :delete %>
|
230
235
|
<% end %>
|
231
236
|
|
232
237
|
MORE EXPLANATION TO COME
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/building_blocks/base.rb
CHANGED
@@ -226,7 +226,8 @@ module BuildingBlocks
|
|
226
226
|
buffer << view.render("#{self.global_options[:templates_folder]}/#{name.to_s}", global_options.merge(block_options).merge(runtime_options))
|
227
227
|
end
|
228
228
|
rescue ActionView::MissingTemplate
|
229
|
-
if block_given
|
229
|
+
if block_given?
|
230
|
+
args.push(global_options.merge(runtime_options))
|
230
231
|
if block.arity > 1
|
231
232
|
buffer << view.capture(*args, &block)
|
232
233
|
else
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: building-blocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Hunter
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-01-
|
18
|
+
date: 2012-01-27 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -90,6 +90,20 @@ dependencies:
|
|
90
90
|
prerelease: false
|
91
91
|
type: :development
|
92
92
|
requirement: *id005
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: jeweler
|
95
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
104
|
+
prerelease: false
|
105
|
+
type: :development
|
106
|
+
requirement: *id006
|
93
107
|
description: ""
|
94
108
|
email: hunterae@gmail.com
|
95
109
|
executables: []
|