Rails console shortcuts
Contact me at LinkedIn  RailsZilla at Facebook  RailsZilla at twitter   google +1  Contact me at Xing  connect me at github

About Marcello

Posts by Marcello:

Rails console shortcuts

Posted in console, Rails, Start

I always forget all those handy hints in Ruby on Rails, while using my Rails console. Here I will drop some very useful console commands to get some daily jobs done: Hint No.1 Sometimes we change the code in a file. In that case we can reload the changes in the rails console by using […]

Tags: , ,

Kanban Certification

Posted on 26. January 2017 in coffee break, related Links, Start | Short Link
with No Comments

IBQMI® Kanban Certification Keeping ahead of the competition in the business market has become an essential goal for companies. Many industries are saturated and competition is not only becoming tougher but closer. Kanban at a glance Kanban brings inventory levels and actual consumption side by side. The process is designed to produce an indicator that […]

Tags: , , , ,

Rails scaffold data types

Posted on 18. May 2016 in Rails | Short Link
with No Comments

If you work with a scaffold it can happen to anybody to forget the datatypes. Here is a cheat sheet for all the Rails 4 (ActiveRecord migration) datatypes at a glance: 12345678910111213    :binary     :boolean     :date     :datetime     :decimal     :float     :integer     :primary_key […]

git push heroku master is asking for authentication

Posted on 23. February 2016 in console, Start | Short Link
with No Comments

In this post I show you how to fix the authentication problem with heroku. If you want to deploy your branch to heroku using this command 1$ git push heroku master and git want an authentication like this 12Username for ‘https://git.heroku.com’: Password for ‘https://git.heroku.com’: then the repository is not pushed, because heroku will not allow […]

Tags: , , , , ,

Security issues for CQ/AEM Instances

Posted on 4. December 2015 in Ruby, Start | Short Link
with No Comments

Because I was checking some security issues in my job, I was concerned with exploits for the Adobe AEM system. We can find a lot of old Adobe AEM Versions out there. To find Websites using Adobe AEM, just go to google and enter: 1inurl:content/geometrixx By doing this, we will get a lot of results […]

Tags: , , , ,

Ruby on Rails Database Indexes

Posted on 22. September 2014 in Rails | Short Link
with No Comments

Handy hint for better database performance in Ruby on Rails: Always add DB index in your Migration! By default, rails does not add indexes automatically for foreign key, you should add indexes by yourself. If you want to speed up your performance, I suggest to add an index for – foreign key – columns that […]

Tags: , , , , , ,

Generate polymorphic URL in Rails

Posted on 5. August 2014 in Rails | Short Link
with No Comments

In this example, I want to explain a best practice for Polymorphic URLs in Rails. I will show really bad things here as an illustrative example. Don’t worry, we will refactor the code later ;-) Let us assume that we have three models, Post, News and Comment. In most cases, a post has many comments […]

Tags: , , ,

Projekt Euler – probem 4 in Ruby

Posted on 25. March 2014 in Ruby | Short Link
with No Comments

Let’s go on with part four of our mathematical soultions-series in Project Euler: Problem: The Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. […]

Tags: , ,

ActiveAdmin with http authentication

Posted on 4. February 2014 in Rails | Short Link
with No Comments

Ever asked yourself how to use HTTP Basic authentication with ActiveAdmin? There are several reasons to use HTTP Basic authentication for your backend. I needed a solution which can be recycled wherever I need a HTTP Basic authentication. I only wanted a central place for User and Password and I wanted just one call wherever […]

Tags: , , , , , ,

Why the Rails default_scope is a bad thing

Posted on 20. November 2013 in Rails | Short Link
with No Comments

Activerecord provides default_scope to set a default scope for all operations on the model. I was never a friend of using default_scope, even when many friends used it in their projects. At the first look, it looks convenient but will lead to a headache very soon. We should avoid using it and here is why: […]

Tags: ,

Copyright © 2011-2017  - RailsZilla – Ruby on Rails tutorials, tips and tricks All rights reserved. | Imprint | Privacy