Skip to content

Instantly share code, notes, and snippets.

@deepakprasanna
Created September 2, 2011 15:05
Show Gist options
  • Save deepakprasanna/1188859 to your computer and use it in GitHub Desktop.
Save deepakprasanna/1188859 to your computer and use it in GitHub Desktop.
if(params[:user][:own_organizations_attributes])
params[:user][:own_organizations_attributes][:org_phone_number] = params[:user][:contact_number].to_i
resource.own_organizations_attributes = params[:user][:own_organizations_attributes]
resource.time_zone = params[:user][:time_zone]
end
#role membership after create
if self.organization.contact_number.nil?
self.organization.update_attributes(:contact_number => self.user.contact_number)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment