Posted August 7th, 2008 by caker
the Capistrano is greatly application ,it’s gem of Rails , wrtten by rails, but you can use it to deploy non rails project , like php . the Webbistrano is a web interface of capistrano .easy to use .
Tags: php, rails
Posted January 10th, 2008 by admin
if you need a select list ,you can add the feature with options_from_collection_for_select, just pass some params to it, likes this :
<select name=”asset[asset_type_id]“>
<%= options_from_collection_for_select @asset_types, “id”, “name”,@asset.asset_type.id %>
</select>
Tags: on, rails, ruby
Posted January 9th, 2008 by admin
the will_paginate is better than clasic_paginate (by default in before 2.0 ), so ,if you need the pagination feature, you can install it with svn check out
./script/plugin install \ svn://errtheblog.com/svn/plugins/will_paginate
this is a simple demo :
#view
#..views/products/list.html.erb
<h1> Products </h1>
<% for product in @products %>
<p> <%= product.name %>(<small style=”color:red;”><%= product.desc %></small>)</p>
<% end %>
<%= will_paginate @products %>
#controller
#…controller/products_controller.rb
# [...]
Tags: on, rails, ruby
Posted January 9th, 2008 by admin
真的让人疯狂~~~~
Tags: on, rails, ruby