Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
##sub model, position class Position < ActiveRecord::Base belongs_to :account has_many :users has_many :position_auto_enrollments validates_uniqueness_of :name, :scope => :account_id def name self[:name].capitalize end end ##snippet from the view that contains multiple models, @user is the super model of the form that contains the submodel position <tr> <th><label for="position_name">Position</label></th> <% fields_for "user[position]", @user.position do |position| %> <td><%= position.text_field 'name' %> </td> <% end %> </tr>
This paste will be private.
From the Design Piracy series on my blog: