public
Fork of tablatom/hobo
Description: The web app builder for Rails
Homepage: http://hobocentral.net
Clone URL: git://github.com/drnic/hobo.git
Search Repo:
yawn - pasted Tom's original version back in + whitespace fix
drnic (author)
Sat May 17 03:13:47 -0700 2008
commit  42f79307691ce4cc6cd02a599912424558dee0ec
tree    d46328da46266cff09def3c08b49f3aa2f571cea
parent  440a0a40cbaae8121c94e4e3635a538f371f1db2
...
97
98
99
 
100
101
102
103
...
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
...
329
330
331
332
333
334
335
336
337
 
 
 
 
 
 
 
 
 
338
339
340
...
397
398
399
400
401
402
403
...
97
98
99
100
101
102
103
104
...
283
284
285
 
 
 
 
 
 
 
286
 
287
288
289
290
...
322
323
324
 
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
...
398
399
400
 
401
402
403
0
@@ -97,6 +97,7 @@
0
         record
0
       end
0
 
0
+
0
       def user_new(user, attributes={})
0
         record = new(attributes)
0
         record.user_changes(user) and record
0
0
@@ -282,15 +283,7 @@
0
         "#{name.underscore.pluralize}"
0
       end
0
 
0
- def with_acting_user(user)
0
- old = acting_user
0
- self.acting_user = user
0
- result = yield
0
- self.acting_user = old
0
- result
0
- end
0
 
0
-
0
       def typed_id
0
         HoboFields.to_name(self) || name.underscore.gsub("/", "__")
0
       end
0
0
@@ -329,12 +322,20 @@
0
 
0
     include Scopes
0
 
0
-
0
     def to_url_path
0
       "#{self.class.to_url_path}/#{to_param}" unless new_record?
0
     end
0
 
0
 
0
+ def with_acting_user(user)
0
+ old = acting_user
0
+ self.acting_user = user
0
+ result = yield
0
+ self.acting_user = old
0
+ result
0
+ end
0
+
0
+
0
     def user_changes(user, changes={})
0
       with_acting_user user do
0
         if new_record?
0
@@ -397,7 +398,6 @@
0
       converted = attributes.map_hash { |k, v| convert_type_for_mass_assignment(self.class.attr_type(k), v) }
0
       send(:attributes_without_hobo_type_conversion=, converted, guard_protected_attributes)
0
     end
0
-
0
 
0
 
0
     def set_creator(user)

Comments

    No one has commented yet.