5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/keyword_attributes_controller.rb', line 5
def index
path = params[:path]
path = "" unless path
path = File.join("",path)
user = (login=session[:user]) && User.find_by_login(login)
node = Node.find(:first, :conditions => ["path=?",path], :user => user)
if node
@kas = node.keyword_attributes
respond_to do |format|
format.html
format.xml { render :xml => @kas}
end
else
respond_to do |format|
format.html {
render :text => "not found", :status => :not_found
}
format.xml { head :not_found }
end
end
end
|