Cross Reference: languages_controller.rb
xref
: /
ontohub
/
app
/
controllers
/
languages_controller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
languages_controller.rb revision 27caf7f48edaed40a295eaeefbfdeaf9ced10ff9
#
# Controller for Languages
#
class
LanguagesController
<
InheritedResources
::
Base
respond_to
:
json
, :
xml
has_pagination
has_scope
:
search
load_and_authorize_resource
:
except
=> [:
index
, :
show
]
def
index
super
do
|
format
|
format.html
do
@
search
=
params
[:
search
]
@
search
=
nil
if
@
search.blank
?
end
end
end
def
create
@
language.user
=
current_user
super
end
def
show
super
do
|
format
|
format.html
do
@
supports
=
resource.supports.all
end
end
end
end