[rails] builder antigo

19 de Janeiro

Builder antigo

<% form_for(:user, :url => '/users/buscar', :builder => ::ActionView::Helpers::FormBuilder) do |f| %>

Builder atual

<% form_for(:user, :url => '/users/buscar', :html => { :class => "nenhuma"}) do |f| %>

Builder usado no projeto <% form_for(:user, :url => '/users/buscar', :builder => ::ActionView::Helpers::FormBuilder, :html => { :class => "nenhuma"}) do |f| %> Bookmark e Compartilhe

Comentários (1)

Segue abaixo procedimento p/ instalar Tiny_mce_Plus(para quem precisar de algo mais detalhado clique aqui)

1 - Instalando

$ cd vendor/plugins
$ git clone git://github.com/devon/tiny_mce_plus.git
$ script/generate tiny_mce_plus_migration
$ rake db:migrate
$ rake tiny_mce_plus:install

2 - instalando dependencias

attachment_fu (git clone git://github.com/technoweenie/attachment_fu.git)
responds_to_parent (git clone git://github.com/pjg/responds_to_parent.git)
will_paginate (git clone git://github.com/mislav/will_paginate.git)

3 - No layout

<%= javascript_include_tiny_mce_if_used %>
<%= tiny_mce if using_tiny_mce? %>
<%= javascript_include_tag :defaults %>

4 - No seu controller

uses_tiny_mce(:options => AppConfig.default_mce_options, :only => [:new, :edit]) Bookmark e Compartilhe
Comentários (1)

Utilização:

<%= @back_issue.print_date.strftime('%B %Y') %>

Lista completa:

Format Meaning
%a The abbreviated weekday name (“Sun'’)
%A The full weekday name (“Sunday'’)
%b The abbreviated month name (“Jan'’)
%B The full month name (“January'’)
%c The preferred local date and time representation
%d Day of the month (01..31)
%H Hour of the day, 24-hour clock (00..23)
%I Hour of the day, 12-hour clock (01..12)
%j Day of the year (001..366)
%m Month of the year (01..12)
%M Minute of the hour (00..59)
%p Meridian indicator (“AM'’ or “PM'’)
%S Second of the minute (00..60)
%U Week number of the current year, starting with the first Sunday as the first day of the first week (00..53)
%W Week number of the current year, starting with the first Monday as the first day of the first week (00..53)
%w Day of the week (Sunday is 0, 0..6)
%x Preferred representation for the date alone, no time
%X Preferred representation for the time alone, no date
%y Year without a century (00..99)
%Y Year with century
%Z Time zone name
%% Literal “%'’ character

Fonte: http://www.linux-mag.com/id/4070

Bookmark e Compartilhe
Comentários (0)
<%= link_to image_tag("search.gif", :border=>0), :action => 'show', :id => user %>

Fonte: http://snippets.dzone.com/posts/show/1375

Bookmark e Compartilhe
Comentários (1)

1 3 Próximo

Copyright © 2008 - Todos os direitos reservados.

diHITT - Notícias BlogBlogs.Com.Br