Cross Reference: users_controller.rb
xref
: /
ontohub
/
app
/
controllers
/
users_controller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
users_controller.rb revision 068c4812bb4a75942b62c2124ca1875525b3ac5c
#
# Displays a user profile
#
class
UsersController
<
InheritedResources
::
Base
actions
:
show
respond_to
:
json
, :
xml
def
show
super
do
|
format
|
format.html
do
@
versions
=
resource.ontology_versions.latest.limit
(
10
)
.
all
@
comments
=
resource.comments.latest.limit
(
10
)
.
all
end
format.json
do
render
:
json
=>
resource.to
_json
(:
only
=> [:
name
, :
name
])
end
format.xml
do
render
:
xml
=>
resource.to
_xml
(:
only
=> [:
id
, :
name
])
end
end
end
end