Skip to content

Instantly share code, notes, and snippets.

@svenyurgensson
Created September 23, 2012 07:03
Show Gist options
  • Save svenyurgensson/3769169 to your computer and use it in GitHub Desktop.
Save svenyurgensson/3769169 to your computer and use it in GitHub Desktop.
(1.9.3@tops) master *% ~/projects/www/benj/tops $
>rails_best_practices .
Source Codes: 100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 0:00:03
./db/schema.rb:16 - always add db index (attachments => [attachmentable_id, attachmentable_type])
./db/schema.rb:107 - always add db index (products => [manufacturer_id])
./app/models/attachment_related/content_image.rb:31 - change Hash Syntax to 1.9
./app/controllers/admin/images_controller.rb:39 - change Hash Syntax to 1.9
./app/controllers/frontend_controller.rb:21 - change Hash Syntax to 1.9
./app/decorators/product_decorator.rb:26 - change Hash Syntax to 1.9
./config/application.rb:12 - change Hash Syntax to 1.9
./config/deploy.rb:28 - change Hash Syntax to 1.9
./config/deploy.rb:43 - change Hash Syntax to 1.9
./config/deploy.rb:55 - change Hash Syntax to 1.9
./config/deploy.rb:55 - change Hash Syntax to 1.9
./config/initializers/simple_form.rb:8 - change Hash Syntax to 1.9
./config/initializers/simple_form.rb:44 - change Hash Syntax to 1.9
./config/initializers/simple_form.rb:44 - change Hash Syntax to 1.9
./config/initializers/simple_form.rb:45 - change Hash Syntax to 1.9
./config/initializers/simple_form.rb:45 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:3 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:7 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:9 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:9 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:10 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:10 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:14 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:18 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:19 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:22 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:22 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:23 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:23 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:27 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:31 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:32 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:35 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:35 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:36 - change Hash Syntax to 1.9
./config/initializers/simple_form_bootstrap.rb:36 - change Hash Syntax to 1.9
./config/routes.rb:95 - change Hash Syntax to 1.9
./config/sitemap.rb:8 - change Hash Syntax to 1.9
./config/sitemap.rb:13 - change Hash Syntax to 1.9
./config/sitemap.rb:18 - change Hash Syntax to 1.9
./config/sitemap.rb:23 - change Hash Syntax to 1.9
./db/migrate/20120309113412_add_products_tags_table.rb:5 - change Hash Syntax to 1.9
./db/migrate/20120424043835_create_settings.rb:5 - change Hash Syntax to 1.9
./db/migrate/20120424043835_create_settings.rb:6 - change Hash Syntax to 1.9
./db/migrate/20120424043835_create_settings.rb:7 - change Hash Syntax to 1.9
./db/migrate/20120424043835_create_settings.rb:8 - change Hash Syntax to 1.9
./db/migrate/20120424043835_create_settings.rb:12 - change Hash Syntax to 1.9
./lib/tasks/servant.rake:6 - change Hash Syntax to 1.9
./app/views/kaminari/_first_page.html.haml:9 - change Hash Syntax to 1.9
./app/views/kaminari/_last_page.html.haml:9 - change Hash Syntax to 1.9
./app/views/kaminari/_next_page.html.haml:9 - change Hash Syntax to 1.9
./app/views/kaminari/_page.html.haml:9 - change Hash Syntax to 1.9
./app/views/kaminari/_page.html.haml:12 - change Hash Syntax to 1.9
./app/views/kaminari/_page.html.haml:14 - change Hash Syntax to 1.9
./app/views/kaminari/_prev_page.html.haml:9 - change Hash Syntax to 1.9
./app/views/shared/_top_navigation.html.haml:6 - change Hash Syntax to 1.9
./app/views/shared/_top_navigation.html.haml:10 - change Hash Syntax to 1.9
./app/views/shared/_top_navigation.html.haml:14 - change Hash Syntax to 1.9
./app/views/themes/simpla/pages/homepage.html.haml:35 - change Hash Syntax to 1.9
./config/initializers/paperclip_interpolations.rb:4 - law of demeter
./app/views/admin/products/_form.html.haml:14 - move code into controller
./app/views/admin/site_design/_colors.html.haml:32 - move code into controller
./app/views/kaminari/_paginator.html.haml:14 - move code into model (page use_count > 2)
./app/cells/breadcrumb_cell.rb:4 - move model logic into model (@resource use_count > 4)
./app/controllers/admin/faqs_controller.rb:15 - move model logic into model (rec use_count > 4)
./app/controllers/admin/products_controller.rb:23 - move model logic into model (arel use_count > 4)
./app/controllers/traits/crudable_trait.rb:59 - move model logic into model (format use_count > 4)
./app/controllers/traits/crudable_trait.rb:83 - move model logic into model (format use_count > 4)
./app/models/attachment_related/attachment.rb:16 - protect mass assignment
./app/models/content_related/content_block.rb:14 - protect mass assignment
./app/models/dealer.rb:14 - protect mass assignment
./app/models/manufacturer.rb:14 - protect mass assignment
./app/models/menu_item.rb:13 - protect mass assignment
./app/models/product.rb:20 - protect mass assignment
./app/models/tags_related/tag.rb:3 - protect mass assignment
./app/models/texts_related/content.rb:3 - protect mass assignment
./app/cells/common_cell.rb:64 - remove unused methods (CommonCell#get_current_menu_title)
./app/cells/widget_cell.rb:11 - remove unused methods (WidgetCell#heading_block)
./app/cells/widget_cell.rb:15 - remove unused methods (WidgetCell#rich_text_block)
./app/controllers/admin/backend_controller.rb:16 - remove unused methods (Admin::BackendController#take_layout)
./app/controllers/admin/backend_controller.rb:20 - remove unused methods (Admin::BackendController#controller_namespace)
./app/controllers/admin/backend_controller.rb:37 - remove unused methods (Admin::BackendController#wants_save_and_list_all?)
./app/controllers/admin/blog_posts_controller.rb:45 - remove unused methods (Admin::BlogPostsController#default_order)
./app/controllers/admin/blog_posts_controller.rb:49 - remove unused methods (Admin::BlogPostsController#custom_imperavi_options)
./app/controllers/admin/products_controller.rb:11 - remove unused methods (Admin::ProductsController#resource_params)
./app/controllers/admin/settings_controller.rb:37 - remove unused methods (Admin::SettingsController#manufacturers_fallback_image_upload)
./app/controllers/admin/static_pages_controller.rb:40 - remove unused methods (Admin::StaticPagesController#resource)
./app/controllers/admin/static_pages_controller.rb:44 - remove unused methods (Admin::StaticPagesController#custom_imperavi_options)
./app/controllers/admin/tags_controller.rb:34 - remove unused methods (Admin::TagsController#resource)
./app/controllers/admin/tags_controller.rb:38 - remove unused methods (Admin::TagsController#link_to_edit)
./app/controllers/admin/theming/homepage_controller.rb:59 - remove unused methods (Admin::Theming::HomepageController#homepage_meta)
./app/controllers/blogs_controller.rb:5 - remove unused methods (BlogsController#resource_class)
./app/controllers/blogs_controller.rb:19 - remove unused methods (BlogsController#take_layout)
./app/controllers/blogs_controller.rb:23 - remove unused methods (BlogsController#default_order)
./app/controllers/dealers_controller.rb:7 - remove unused methods (DealersController#resource_class)
./app/controllers/frontend_controller.rb:36 - remove unused methods (FrontendController#wants_save_and_list_all?)
./app/controllers/manufacturers_controller.rb:7 - remove unused methods (ManufacturersController#resource_class)
./app/controllers/manufacturers_controller.rb:28 - remove unused methods (ManufacturersController#default_order)
./app/controllers/traits/crudable_trait.rb:143 - remove unused methods (ProductsController#resources_url)
./app/controllers/traits/crudable_trait.rb:152 - remove unused methods (ProductsController#resource_url)
./app/controllers/traits/crudable_trait.rb:165 - remove unused methods (ProductsController#action_for_save_resource)
./app/controllers/traits/crudable_trait.rb:248 - remove unused methods (ProductsController#decorated_resource)
./app/controllers/traits/crudable_trait.rb:253 - remove unused methods (ProductsController#decorated_resources)
./app/controllers/traits/crudable_trait.rb:258 - remove unused methods (ProductsController#resource_defined?)
./app/controllers/traits/crudable_trait.rb:261 - remove unused methods (ProductsController#resources_defined?)
./app/controllers/traits/crudable_trait.rb:327 - remove unused methods (ProductsController#includes_for_resource)
./app/helpers/helpers_trait.rb:12 - remove unused methods (HelpersTrait#manufacturers_list)
./app/helpers/helpers_trait.rb:28 - remove unused methods (HelpersTrait#topproducers)
./app/helpers/helpers_trait.rb:40 - remove unused methods (HelpersTrait#menu_items)
./app/helpers/helpers_trait.rb:44 - remove unused methods (HelpersTrait#page_meta_container)
./app/models/attachment_related/attachment.rb:26 - remove unused methods (Attachment#reprocess_images!)
./app/models/content_related/ad_block.rb:17 - remove unused methods (AdBlock#to_image)
./app/models/product.rb:61 - remove unused methods (Product#uniform_ids_by_manufacturers)
./app/models/product.rb:97 - remove unused methods (Product#generate_meta!)
./app/models/site_settings.rb:20 - remove unused methods (SiteSettings#set_theme_for)
./app/models/tabless/affilinet_connection.rb:41 - remove unused methods (AffilinetConnection#get)
./app/models/tabless/tabless.rb:9 - remove unused methods (Tabless#columns)
./app/models/tabless/tabless.rb:13 - remove unused methods (Tabless#persisted?)
./app/models/texts_related/blog_post.rb:12 - remove unused methods (BlogPost#rand)
./app/models/traits/sluggable_trait.rb:44 - remove unused methods (StaticPage#find)
./app/models/traits/sluggable_trait.rb:48 - remove unused methods (StaticPage#find_by)
./app/models/traits/sluggable_trait.rb:53 - remove unused methods (StaticPage#exists?)
./app/views/products/_product.html.haml:17 - replace instance variable with local variable
./app/views/products/_product.html.haml:17 - replace instance variable with local variable
./config/routes.rb:10 - restrict auto-generated routes dealers (only: [])
./config/routes.rb:13 - restrict auto-generated routes admin/products (only: [])
./config/routes.rb:14 - restrict auto-generated routes admin/manufacturers (only: [])
./config/routes.rb:17 - restrict auto-generated routes admin/dealers (only: [])
./config/routes.rb:20 - restrict auto-generated routes admin/menu_items (only: [:edit, :update])
./config/routes.rb:21 - restrict auto-generated routes admin/site_design (only: [:edit, :update])
./config/routes.rb:24 - restrict auto-generated routes admin/settings (only: [:edit, :update])
./config/routes.rb:29 - restrict auto-generated routes admin/settings (only: [:edit, :update])
./config/routes.rb:42 - restrict auto-generated routes admin/tags (only: [])
./config/routes.rb:43 - restrict auto-generated routes admin/customer_tags (only: [])
./config/routes.rb:44 - restrict auto-generated routes admin/appointment_tags (only: [])
./config/routes.rb:45 - restrict auto-generated routes admin/category_tags (only: [])
./config/routes.rb:48 - restrict auto-generated routes admin/blog_posts (only: [])
./config/routes.rb:49 - restrict auto-generated routes admin/static_pages (only: [])
./config/routes.rb:50 - restrict auto-generated routes admin/faq (only: [:edit, :update])
./config/routes.rb:52 - restrict auto-generated routes admin/images (only: [:create, :index])
./config/routes.rb:63 - restrict auto-generated routes admin/connections/affilinet/shops/categories (only: [:index, :toggle])
./config/routes.rb:82 - restrict auto-generated routes products/manufacturers (only: [])
./config/routes.rb:83 - restrict auto-generated routes products/manufacturers/blogs (only: [])
./config/routes.rb:84 - restrict auto-generated routes products/manufacturers/blogs/dealers (only: [])
./app/views/products/index.js.erb:2 - simplify render in views
./app/views/products/index.js.erb:4 - simplify render in views
./app/views/admin/site_design/edit.html.haml:16 - simplify render in views
./app/views/admin/themes/homepage/edit.html.haml:14 - simplify render in views
./app/views/products/index.html.haml:8 - simplify render in views
./app/models/content_related/content_block.rb:51 - use parentheses around parameters in method definitions
./app/models/content_related/content_block.rb:90 - use parentheses around parameters in method definitions
./app/models/content_related/faq_block.rb:38 - use parentheses around parameters in method definitions
./app/models/content_related/meta_content_block.rb:26 - use parentheses around parameters in method definitions
./app/models/content_related/meta_content_block.rb:35 - use parentheses around parameters in method definitions
./app/models/content_related/meta_content_block.rb:39 - use parentheses around parameters in method definitions
./app/models/tabless/affilinet_active_categories.rb:22 - use parentheses around parameters in method definitions
./app/models/tabless/affilinet_active_categories.rb:30 - use parentheses around parameters in method definitions
./app/models/tabless/affilinet_active_categories.rb:39 - use parentheses around parameters in method definitions
./app/models/tabless/affilinet_connection.rb:7 - use parentheses around parameters in method definitions
./app/models/tabless/manufacturer_teaser_fallback.rb:7 - use parentheses around parameters in method definitions
./app/models/traits/seo_ready_trait.rb:41 - use parentheses around parameters in method definitions
./app/models/traits/sluggable_trait.rb:75 - use parentheses around parameters in method definitions
./app/models/traits/web_link_trait.rb:22 - use parentheses around parameters in method definitions
./app/helpers/admin/backend_helper.rb:35 - use parentheses around parameters in method definitions
./app/helpers/admin/backend_helper.rb:40 - use parentheses around parameters in method definitions
./app/helpers/application_helper.rb:32 - use parentheses around parameters in method definitions
./app/cells/breadcrumb_cell.rb:4 - use parentheses around parameters in method definitions
./app/cells/facebook_cell.rb:19 - use parentheses around parameters in method definitions
./app/cells/fancybox_cell.rb:5 - use parentheses around parameters in method definitions
./app/cells/widget_cell.rb:6 - use parentheses around parameters in method definitions
./app/cells/widget_cell.rb:22 - use parentheses around parameters in method definitions
./app/cells/widget_cell.rb:40 - use parentheses around parameters in method definitions
./app/controllers/admin/backend_controller.rb:25 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:135 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:139 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:143 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:147 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:152 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:156 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:161 - use parentheses around parameters in method definitions
./app/controllers/traits/crudable_trait.rb:242 - use parentheses around parameters in method definitions
./app/services/alchemy_text.rb:11 - use parentheses around parameters in method definitions
./app/services/meta_text_extractor.rb:5 - use parentheses around parameters in method definitions
Please go to http://rails-bestpractices.com to see more useful Rails Best Practices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment