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 9b39a422a5bbbd4550a9c30b66c5c289dcdca849
#
# 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