- 93rails,
- 92rubyonrails,
- 73ruby,
- 21tutorial,
- 17gimp,
- 17programming,
- 15cardmaking,
- 13css,
- 10linux,
- 9rest,
12 Jun 07
Rails Envy: Ruby on Rails Rake Tutorial (aka. How rake turned me into an alcoholic)
-
Task creation - With every large application you almost always end up writing scripts that you can run from the command line. You might want to clear the cache, run a maintenance task, or migrate the database. Rather than creating 10 separate shell scripts (or one big complex one) you can create a single "Makefile" in which you can organize things by task. Tasks then can be run by typing something like "make stupid" (which runs the stupid task).
23 May 07
Javascript, AJAX and scriptaculous on Rails
-
<%= link_to_function "[Show|Hide]",
visual_effect(:toggle_blind, :links, :duration => 1) %>
06 Apr 07
Ruby Fleebie » Check for nil and initialize on a single line
-
- x = get_some_object if x.nil?
- x ||= get_some_object
1) You can use the if modifier
19 Feb 07
Re:Remository CB PlugIn - Remository JoomlaBoard Forum - Remository Mambo-Joomla Components
13 Feb 07
Rails Forum / Ruby on Rails Help and Discussion Forum / One Form Two Model Create, Show all validations
-
- @user = User.new(params[:user])
- @contact = @user.build_contact(params[:contact])
Module: ActionView::Helpers::FormHelper
-
This allows you to add fields from one model in another model really easily and cleanly.
- draconid on 2007-02-09
-
fields_for(object_name, *args) {|builder.new(object_name, object, self, options, block)| ...}
Creates a scope around a specific model object like form_for, but doesn‘t create the
form tags themselves. This makes fields_for suitable for specifying
additional model objects in the same form. Example:<% form_for :person, @person, :url => { :action => "update" } do |person_form| %>
First name: <%= person_form.text_field :first_name %>
Last name : <%= person_form.text_field :last_name %>
<% fields_for :permission, @person.permission do |permission_fields| %>
Admin? : <%= permission_fields.check_box :admin %>
<% end %>
<% end %>
Note: This also works for the methods in FormOptionHelper and DateHelper that are designed to work with an
object as base. Like collection_select and datetime_select.
Top Tags
Sponsored Links
Ads by Google
View All Recent Tags (49)
- 40rails,
- 32rubyonrails,
- 16ruby,
- 15cardmaking,
- 7rest,
- 3plugins,
- 3tags,
- 3testing,
- 3chalks,
- 3stamping,
- 3access,
- 2security,
- 2migration,
- 2sessions,
- 2embossing,
- 2validation,
- 2relationships,
- 1delicious,
- 1flickr,
- 1collect,
- 1map,
- 1select,
- 1links,
- 1weightloss,
- 1calories,
- 1programming,
- 1save,
- 1controller,
- 1multiplemodels,
- 1acts_as_attachment,
- 1css,
- 1api,
- 1fields_for,
- 1acts_as_taggable,
- 1functional,
- 1ajax,
- 1vote,
- 1routing,
- 1stylesheets,
- 1with_scope,
- 1sti,
- 1templates,
- 1activerecord,
- 1forms,
- 1polymorphic,
- 1belongs_to,
- 1has_many,
- 1hamsters,
- 1unittests
Public Tags (194)
Fran 's Public Lists (0)
No lists have been created yet.
"List" is a great way to organize, share and display your specific collection of bookmarks.
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo