Ruby On Rails in UA Icon_home Главная Add to bookmarks Translate translate Profile Войти
Регистрация Форум Блоги Пользователи Ресурсы Список джемов      Поиск   

Ruby On Rails in UA/Обновления, новости, баги, плагины и прочее/Views rails 2.0

2008-06-10 16:15:14 Ответить  
admin
Ruslan Voloshin
Адрес: odessa
Сообщений: 1094
Регистр: 2007-03-13
его блог 36 сообщ.
Views rails 2.0
  •  
Update Prototype to 1.6.1 and script.aculo.us to 1.8.1
Use 'yield' rather than '@content_for instance'
Allow error_messages_for to report errors for multiple objects, and support for customizing the name of the object in the error summary header.
error_messages_for :account, :user, :subscription, :object_name => :account
form.text_area handles the :size option (as text_area) (:size => '60x10' -> cols="60" rows="10")
:post option for UrlHelper#link_to is deprecated -> :method => :get | :post | :delete
ex.: link_to "Destroy", person_url(:id => person), :method => :delete
Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post
Added special case for "1 Byte" in NumberHelper#number_to_human_size
Allow form_for and fields_for to work with indexed form inputs.

Added months and years to the resolution of DateHelper#distance_of_time_in_words, such that "60 days ago" becomes "2 months ago"
button_to accepts :method so you can PUT and DELETE with it.
radio_button_tag generates unique id attributes
Fixed FormOptionsHelper#select to respect :selected value
Added access to nested attributes in RJS.
Examples:

Update JavaScriptGenerator#show/hide/toggle/remove to new Prototype syntax for multiple ids
Added an html_options hash parameter to javascript_tag() and update_page_tag() helpers.

Example:

Gives:

Which is needed for dealing with the IE6 DOM when it's not yet fully loaded.
Add to escape html while leaving any currently escaped entities alone.
Add support for converting blocks into function arguments to JavaScriptGenerator#call and JavaScriptProxy#call
Force *_url named routes to show the host in ActionView:

Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1)

Added block-usage to TagHelper#content_tag. Example:


Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs
Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag
All date/datetime selects can now accept an array of month names with :use_month_names. Allows for localization
Added :time_separator, :include_seconds and :order to select_datetime, datetime_select and time_select
Add time_select to work with time values in models, and :index and @auto_index capability to model driven date/time selects
date_select and datetime_select take a :default option.

Adds html id attribute to date helper elements
Allow inGroupsOf and eachSlice to be called through rjs
mail_to :encode => 'hex' also encodes the mailto: part of the href attribute as well as the linked email when no name is given
select :multiple => true suffixes the attribute name with [] unless already suffixed
select :include_blank option can be set to a string instead of true, which just uses an empty string
Added caching option to AssetTagHelper#stylesheet_link_tag and AssetTagHelper#javascript_include_tag. Examples:


...when caching is on, all.css is the concatenation of style1.css, styleB.css, and styleX2.css.
Same deal for JavaScripts.
Added RecordIdentifier to enforce view conventions on records for dom ids, classes, and partial paths
Added page[record] accessor to JavaScriptGenerator that relies on RecordIdentifier to find the right dom id. Example:

Added RecordTagHelper for using RecordIdentifier conventions on divs and other container elements. Example:

Added record identifications to FormHelper#form_for and PrototypeHelper#remote_form_for. Examples:

This will expand to be the same as:

And for new records:

This will expand to be the same as:

Add field_set_tag for generating field_sets
Added block acceptance to JavaScriptHelper#javascript_tag.
Allow JSON-style values for the :with option of observe_field
Add link_to :back which uses your referrer with a fallback to a javascript link.
error_messages_for also takes :message and :header_message options which defaults to the old "There were problems with the following fields: " and " errors prohibited this from being saved".
Added AtomFeedHelper (slightly improved from the atom_feed_helper plugin)
Added FormHelper#label
Added :mouseover short-cut to AssetTagHelper#image_tag for doing easy image swaps
Add 'disabled' attribute to separators used in time zone and country selects.
,
Назадназад Новыйновый Ответитьответить
Реклама: Что способно упростить производство? Точный ответ - точные производственные линии inppk. много! Узнайте цены: Техпластина, а также барт в нашей компании! Очень много!
Ключевые слова:
Гости: 93 Онлайн: Яковлев Кирилл,
Rambler's Top100
О проекте по всем вопросам обращайтесь на support
Rubyclub.com.ua Copyright © 2007 - 2008