minor change
This commit is contained in:
@ -7,14 +7,10 @@ module Context
|
|||||||
end
|
end
|
||||||
|
|
||||||
def add_file(file_attributes)
|
def add_file(file_attributes)
|
||||||
file = files.create(file_attributes)
|
files.create(file_attributes).tap { save }
|
||||||
save
|
|
||||||
file
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_file!(file_attributes)
|
def add_file!(file_attributes)
|
||||||
file = files.create!(file_attributes)
|
files.create!(file_attributes).tap { save! }
|
||||||
save!
|
|
||||||
file
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user