Skip to content

marciotrindade/show_in_columns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShowInColumns

It's a helper to show your content in columns when you use a table.

Attributes

collection => an Array or Hash of objects ex. User.all
collumns   => number of columns that will create default is 2
block      => a block of code that will repeat You need add a tag <td>

Install

to instal run:

script/plugin install git://github.com/marciotrindade/show_in_columns.git

Example

You can use like this:

<table id="list_users">
	<% show_in_columns User.all, 2 do |user| -%>
		<td><%=user.name%></td>
	<% end -%>
</table>

this code will generate a HTML like this:

<tr>
  <td>Name 1</td>
  <td>Name 2</td>
</tr>
<tr>
  <td>Name 3</td>
</tr>

Copyright (c) 2008 Marcio Trindade (marciotrindade@gmail.com), released under the MIT license

About

It's a helper to show your content in columns when you use a table.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages