2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'app/controllers/var.rb', line 2
def index
only_provides :json, :text, :pp
filter = Hash.new
params.each do |key, value|
next if ["action", "controller", "format", "id"].include?(key)
next if value == nil
if value =~ /^\/.+\/$/
filter[key] = Regexp.new(value[1..-2]) rescue value
else
filter[key] = Regexp.new("^#{Regexp.escape(value)}$")
end
end
filter.freeze
@attributes = SlashPort::Component.get_attributes(filter)
display @attributes
end
|