class Rails::Generators::JbuilderGenerator
Public Instance Methods
attributes_list(attributes = attributes_names)
click to toggle source
# File lib/generators/jbuilder_generator.rb, line 16 def attributes_list(attributes = attributes_names) attributes.map { |a| ":#{a}"}.join(",\n" + ' '*14) end
copy_view_files()
click to toggle source
# File lib/generators/jbuilder_generator.rb, line 8 def copy_view_files ['index', '_show'].each do |view| filename = filename_with_extensions(view) template filename, File.join('app/views', controller_file_path, filename) end template filename_with_extensions('partial'), File.join('app/views', controller_file_path, filename_with_extensions("_#{singular_name}")) end