Skip to content
Snippets Groups Projects
Commit 759e832b authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

fixing repositories proxy

parent c17f2a56
No related branches found
No related tags found
No related merge requests found
...@@ -11,17 +11,17 @@ module RepositoriesProxy ...@@ -11,17 +11,17 @@ module RepositoriesProxy
end end
def respond_to?(method_name, include_private = false) def respond_to?(method_name, include_private = false)
(method_name =~ /_repository/) || super is_repository?(method_name) || super
end end
private private
def is_repository?(method_name) def is_repository?(method_name)
(method_name =~ /_repository/) && application_repository.include?(repository_name(method_name)) (method_name.to_s =~ /_repository/) && application_repository.include?(repository_name(method_name))
end end
def repository_name(method_name) def repository_name(method_name)
method_name.split('_repository').first.to_sym method_name.to_s.split('_repository').first.to_sym
end end
def application_repository def application_repository
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment