towsta 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/towsta/envs/production.rb +1 -1
- data/lib/towsta/version.rb +1 -1
- data/lib/towsta/vertical-core/crud.rb +4 -4
- metadata +2 -2
data/lib/towsta/version.rb
CHANGED
@@ -4,7 +4,7 @@ module Towsta
|
|
4
4
|
|
5
5
|
attr_accessor :message
|
6
6
|
|
7
|
-
def update args, author
|
7
|
+
def update args, author=Towsta.author
|
8
8
|
args.each {|k,v| self.send("#{k}=".to_sym, v)}
|
9
9
|
self.save author
|
10
10
|
end
|
@@ -13,7 +13,7 @@ module Towsta
|
|
13
13
|
#to-do
|
14
14
|
end
|
15
15
|
|
16
|
-
def save creator
|
16
|
+
def save creator=Towsta.author
|
17
17
|
creator = author.email if author
|
18
18
|
export = self.attributes
|
19
19
|
export.delete :author
|
@@ -26,11 +26,11 @@ module Towsta
|
|
26
26
|
@message = response[:message]
|
27
27
|
self.id = response[:id] if response[:status]
|
28
28
|
self.author = User.find_by_email creator
|
29
|
-
Towsta::Memory.flush if
|
29
|
+
Towsta::Memory.flush if production?
|
30
30
|
response[:status]
|
31
31
|
end
|
32
32
|
|
33
|
-
def self.create args, creator
|
33
|
+
def self.create args, creator=Towsta.author
|
34
34
|
new = self.new(args.merge(:id => nil))
|
35
35
|
new.save creator
|
36
36
|
new
|