Created
March 23, 2010 16:09
-
-
Save JonasNielsen/341336 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Designer < ActiveRecord::Base | |
has_one :login, :as => :user, :dependent => :destroy | |
accepts_nested_attributes_for :login | |
end |
This file contains hidden or 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
- # VIEW FOR ADDING A NEW DESIGNER | |
%h1 New Designer | |
- form_for(@designer) do |f| | |
- f.fields_for :login do |login| | |
= login.label :email | |
%br/ | |
= login.text_field :email | |
%br/ | |
= login.label :password | |
%br/ | |
= login.password_field :password | |
%br/ | |
= login.label :password_confirmation | |
%br/ | |
= login.password_field :password_confirmation |
This file contains hidden or 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
class Users < ActiveRecord::Base | |
belongs_to :user, :polymorphic => true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment