Skip to content

Revert "prevent downstream nil exception when view_definition is nil." #353

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -352,7 +352,7 @@ def table_name_or_views_table_name(table_name)

def views_real_column_name(table_name, column_name)
view_definition = schema_cache.view_information(table_name)[:VIEW_DEFINITION]
match_data = view_definition.match(/([\w-]*)\s+as\s+#{column_name}/im) rescue nil
match_data = view_definition.match(/([\w-]*)\s+as\s+#{column_name}/im)
match_data ? match_data[1] : column_name
end

Expand Down