-
Notifications
You must be signed in to change notification settings - Fork 922
Method list dialog #22921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method list dialog #22921
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,22 @@ class MiqAeMethod < ApplicationRecord | |
| AVAILABLE_SCOPES = ["class", "instance"] | ||
| validates_inclusion_of :scope, :in => AVAILABLE_SCOPES | ||
|
|
||
| scope :name_path_search, lambda { |search| | ||
| where('name ILIKE ? or relative_path ILIKE ?', "%#{search}%", "%#{search}%") if search.present? | ||
| } | ||
|
|
||
| scope :domain_search, lambda { |domain_id| | ||
| where(:domain_id => domain_id) if domain_id.present? | ||
| } | ||
|
|
||
| scope :selected_methods, lambda { |method_ids| | ||
| if method_ids.present? | ||
| where(:id => method_ids.split(',').map(&:to_i)) | ||
| else | ||
| where(nil) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unsure, but think a simple
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @kbrock , Yes, I used but, while using the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. then lets use |
||
| end | ||
| } | ||
|
|
||
| def self.available_languages | ||
| AVAILABLE_LANGUAGES | ||
| end | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, if we want no results, then you can do
: noneDo this across these 3 methods