My favorites
▼
|
Sign in
substruct
Open-source Ruby on Rails E-Commerce
Project Home
Downloads
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
56
attachment: validate_role_name.patch
(681 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/role.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/role.rb (revision 43)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/role.rb (working copy)
@@ -4,7 +4,9 @@
has_and_belongs_to_many :users
has_and_belongs_to_many :rights, :order => 'name ASC'
- # Sets rights by list of id's passed in
+ validates_presence_of :name
+
+ # Sets rights by list of id's passed in
def right_ids=(id_list)
self.rights.clear
for id in id_list
Powered by
Google Project Hosting