Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
likvid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Cederqvist
likvid
Commits
e814239f
Commit
e814239f
authored
18 years ago
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
Allow the user to leave some saldos empty when using
create_snapshot. Blank saldos won't create any saldo rows.
parent
e15a10ec
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/saldos_controller.rb
+9
-7
9 additions, 7 deletions
app/controllers/saldos_controller.rb
with
9 additions
and
7 deletions
app/controllers/saldos_controller.rb
+
9
−
7
View file @
e814239f
...
@@ -62,14 +62,16 @@ class SaldosController < ApplicationController
...
@@ -62,14 +62,16 @@ class SaldosController < ApplicationController
ok
=
true
ok
=
true
@saldos
=
[]
@saldos
=
[]
(
0
...
params
[
:saldos
].
to_i
).
each
{
|
ix
|
(
0
...
params
[
:saldos
].
to_i
).
each
{
|
ix
|
if
params
[
:saldo
][
ix
.
to_s
][
:amount
]
!=
""
saldo
=
Saldo
.
new
(
params
[
:saldo
][
ix
.
to_s
])
saldo
=
Saldo
.
new
(
params
[
:saldo
][
ix
.
to_s
])
puts
ix
puts
ix
puts
params
[
:saldo
][
ix
]
puts
params
[
:saldo
][
ix
.
to_s
]
puts
params
[
:saldo
]
puts
params
[
:saldo
]
if
not
saldo
.
save
if
not
saldo
.
save
ok
=
false
ok
=
false
end
end
@saldos
<<
saldo
@saldos
<<
saldo
end
}
}
if
ok
if
ok
flash
[
:notice
]
=
'Saldos were successfully created.'
flash
[
:notice
]
=
'Saldos were successfully created.'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment