Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
11e4709f
Commit
11e4709f
authored
Apr 04, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compatibility with old events
parent
a951e6f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
app/models/gitlab_serialize.rb
app/models/gitlab_serialize.rb
+6
-0
No files found.
app/controllers/projects_controller.rb
View file @
11e4709f
...
@@ -13,7 +13,7 @@ class ProjectsController < ApplicationController
...
@@ -13,7 +13,7 @@ class ProjectsController < ApplicationController
def
index
def
index
@projects
=
current_user
.
projects
@projects
=
current_user
.
projects
@projects
=
@projects
.
select
(
&
:last_activity_date
).
sort_by
(
&
:last_activity_date
).
reverse
@projects
=
@projects
.
select
(
&
:last_activity_date
).
sort_by
(
&
:last_activity_date
).
reverse
@events
=
Event
.
where
(
:project_id
=>
@projects
.
map
(
&
:id
)).
recent
.
limit
(
4
0
)
@events
=
Event
.
where
(
:project_id
=>
@projects
.
map
(
&
:id
)).
recent
.
limit
(
2
0
)
end
end
def
new
def
new
...
...
app/models/gitlab_serialize.rb
View file @
11e4709f
class
GitlabSerialize
class
GitlabSerialize
# Called to deserialize data to ruby object.
# Called to deserialize data to ruby object.
def
load
(
data
)
def
load
(
data
)
hash
=
parse_data
(
data
)
hash
=
HashWithIndifferentAccess
.
new
(
hash
)
if
hash
hash
end
def
parse_data
(
data
)
JSON
.
load
(
data
)
JSON
.
load
(
data
)
rescue
JSON
::
ParserError
rescue
JSON
::
ParserError
begin
begin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment