mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
parent
0734eb7ff3
commit
2886cb582d
4 changed files with 9 additions and 8 deletions
|
@ -8,11 +8,15 @@ module Admin
|
|||
helper_method :durations
|
||||
helper_method :statuses
|
||||
|
||||
def self.default_status
|
||||
'effective'
|
||||
end
|
||||
|
||||
def index
|
||||
@search = OpenStruct.new(search_params)
|
||||
|
||||
unless @search.status
|
||||
@search.status = default_status
|
||||
@search.status = self.class.default_status
|
||||
end
|
||||
|
||||
prices = ::Billing::Price.all
|
||||
|
@ -105,11 +109,7 @@ module Admin
|
|||
end
|
||||
|
||||
def statuses
|
||||
::Billing::Price.statuses
|
||||
end
|
||||
|
||||
def default_status
|
||||
'effective'
|
||||
::Billing::Price.statuses.map { |status| [status.capitalize, status] }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue