heartcombo--simple_form/test/support/mock_controller.rb

25 lines
423 B
Ruby
Raw Normal View History

2009-12-08 13:48:31 +00:00
class MockController
2011-12-18 18:42:56 +00:00
attr_writer :action_name
def _routes
2010-04-22 12:33:23 +00:00
self
end
def action_name
2011-12-17 10:57:43 +00:00
defined?(@action_name) ? @action_name : "edit"
end
2009-12-08 13:48:31 +00:00
def url_for(*args)
"http://example.com"
end
def url_helpers
self
end
def hash_for_user_path(*args); end
def hash_for_validating_user_path(*args); end
def hash_for_other_validating_user_path(*args); end
def hash_for_users_path(*args); end
2009-12-08 13:48:31 +00:00
end