Hello,

I am trying to find a solution to create new Projects and Respositories by 
script.

So, from the console, I have tried:

> u = User.find(3)
> p=Project.create(:title => 'junk', :slug => 'junk', :description => 
> 'junk', :owner => u)


This returns:

> => #<Project id: nil, title: "junk", description: "junk", user_id: nil, 
> created_at: nil, updated_at: nil, slug: "junk", license: nil, home_url: 
> nil, mailinglist_url: nil, bugtracker_url: nil, owner_id: 3, owner_type: 
> "User", wiki_enabled: true, site_id: nil, merge_requests_need_signoff: 
> false, oauth_signoff_key: nil, oauth_signoff_secret: nil, 
> oauth_signoff_site: nil, oauth_path_prefix: nil, 
> merge_request_custom_states: nil, suspended_at: nil>


and p.save returns false.
How is the 'id' generated?

Is the method above the right one to create a new project?

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com



Reply via email to