Other than simplifying the controller, this'll make it easier to write tests for this code.
16 lines
255 B
Ruby
16 lines
255 B
Ruby
class Admin::Banners::FormComponent < ApplicationComponent
|
|
include TranslatableFormHelper
|
|
include GlobalizeHelper
|
|
attr_reader :banner
|
|
|
|
def initialize(banner)
|
|
@banner = banner
|
|
end
|
|
|
|
private
|
|
|
|
def sections
|
|
WebSection.all
|
|
end
|
|
end
|