Search
Project
General
Profile
Home
Projects
Help
Sign in
Register
Search
:
Redmine
All Projects
Redmine
Overview
Download
Activity
Roadmap
Issues
News
Wiki
Plugins
Forums
Repository
Download (667 Bytes)
RE: Webdav plugin
» webdav_setting.rb
Terence Mill
, 2011-08-02 09:29
class
WebdavSetting
<
ActiveRecord
::
Base
belongs_to
:project
def
self
.
find_or_create
(
pj_id
)
setting
=
WebdavSetting
.
find
(
:first
,
:conditions
=>
[
'project_id = ?'
,
pj_id
])
unless
setting
setting
=
WebdavSetting
.
new
setting
.
project_id
=
pj_id
setting
.
files_enabled
=
true
setting
.
documents_enabled
=
true
setting
.
subversion_enabled
=
false
setting
.
subversion_only
=
false
setting
.
files_label
=
l
(
:files_label
)
setting
.
documents_label
=
l
(
:documents_label
)
setting
.
subversion_label
=
l
(
:subversion_label
)
setting
.
macosx_write
=
false
setting
.
save!
end
return
setting
end
end
« Previous
1
2
3
Next »
(1-1/3)
Loading...