class Rails::Generators::DecanterGenerator
Constants
- ASSOCIATION_TYPES
Public Instance Methods
create_decanter_file()
click to toggle source
# File lib/generators/rails/decanter_generator.rb, line 12 def create_decanter_file template 'decanter.rb.erb', File.join('app/decanters', class_path, "#{file_name}_decanter.rb") end
Private Instance Methods
associations()
click to toggle source
# File lib/generators/rails/decanter_generator.rb, line 22 def associations attributes - inputs end
inputs()
click to toggle source
# File lib/generators/rails/decanter_generator.rb, line 18 def inputs attributes.find_all { |attr| ASSOCIATION_TYPES.exclude?(attr.type) } end
parent_class_name()
click to toggle source
# File lib/generators/rails/decanter_generator.rb, line 26 def parent_class_name 'Decanter::Base' end