Created
November 1, 2011 18:29
-
-
Save jdkealy/1331460 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#FORM | |
%fieldset#organization{:style => "display:none"} | |
%h3 | |
Organization | |
= f.fields_for :organisations do |org| | |
.row | |
.span5 | |
= org.input :name, :label => "<strong>Name of the Organization</strong>" | |
.span5 | |
//= org.input :title, :label => "Your role" | |
.row | |
.span10 | |
= org.input :description, :as => :text, :label => "Description of the organization", :hint => "Give us a short description of your company or organizaiton." | |
.row | |
= org.link_to_remove "Remove this oranisation" | |
= f.link_to_add "Add an organisation", :organisations | |
%hr.prof_bar | |
#profile | |
class Profile < ActiveRecord::Base | |
has_many :memberships | |
has_many :organisations, :through => :memberships | |
#organisations | |
class Organisation < ActiveRecord::Base | |
has_many :memberships | |
has_many :members, :through => :memberships | |
#membership | |
class Membership < ActiveRecord::Base | |
belongs_to :organisation | |
belongs_to :profile | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment