AngularJS and Ruby on Rails work together

Finding the best integration of AngularJS and Ruby on Rails

Recently I got really excited with AngularJS so to make it work perfectly with Ruby on Rails there are some configurations needed. There are available blog posts on how to integrate it perfectly but somehow I wasn’t happy with the available preferences. Some offered to add the javascript files manually to the project and to manual project organization, others offered some kind of gem packager or even automated as a rails app template.

My goal is to describe how to start new rails app project from the scratch but the instructions should be succinct enough to be able to reuse them for the existing project (Actually I did extract it from the existing application I am working on). For the front end development I recently discovered great gem that really can make it more closer to pure full stack javascript development.
Bower is a great javascript package manager by the people who are working on Twitter Boostrap. It is like Bundler but made for javascript instead of ruby language. When I found out that there is a ruby gem that is integrated with rake tasks so I can easily update all javascript libraries without needing adding gem library for each one. The gem is called bower-rails.

My initial plan is to evolve this post into a series of blog posts on how to develop a fully functional demo application so I’ve included some steps that are might not needed but are good to have. Don’t worry I will provide explanation why I am using each of them.
Here is my plan what I will try to achieve with this series of posts:

  • creating a new demo project with angularJS from scratch, showing all my changes along the way, and trying to explain every step. this will include creating basic rails 4 app
  • adding basic gems
  • setup front end development with Bower
  • adding angularJS
  • implementing basic Rails and AngularJS controllers

Continue reading “AngularJS and Ruby on Rails work together”

Four Questions About Leadership

I hear four questions asked about leadership often. This article gives a short answer to each of these important questions.

Why Does Leadership Matter?

Parents universally hope that their children develop leadership qualities. They know that leaders are people who are effective in what they do, are respected by others, and typically rewarded for those skills in a variety of ways. It is in these formative years that, through our parents, we first see leadership as desirable and important.

As young people we look up to people around us that motivate and listen to us people that seem like real-life heroes. We consider these people leaders.

As we grow we begin to relate leaders to their jobs and ministers, teachers, police officers. And later Mayors, Presidents, and CEO’s…

As adults all of these thoughts and experiences define why we think leaders have desirable traits and play roles we admire (and why we desire these things for our children).

All of these experiences and thoughts help us define why leadership matters and it matters because leaders make a difference and can shape the future. It matters because leaders are valued and valuable. In everyone’s mind leadership, especially when it is good, matters. Continue reading “Four Questions About Leadership”

Ambitions

I aim to become the president of my country. I have the object of becoming the greatest scientist. I will one day be the richest person in the world. I aim to and so goes the list of ambitions of people. Nobody remembers that the final goal for each one of us is going back to earth. Let us talk more about ambitions.

Are ambitions good or bad? This is difficult to answer, isn’t it? To be an ambitious person must be very good. With ambitions a person strives to achieve a great feat. Few of us have very big ambitions and few very small. It all depends on our contentment. What will make us feel happy? What will make us feel worthy, and what will make us feel powerful? It’s all about what we want from life. If you want money at any cost, you will compromise with all other values and try to make more money. But if your ambition is to become an honest person and live a God fearing life, no amount of money can attract you to do any wrongs.

Ambitions therefore depend upon our character, culture, mental makeup, outlook, values and so on. Till our ambitions don’t trouble others it is ok. If by achieving our goals, we make others happy, that is still better. But if our ambitions hurt others, we must revisit our thinking and redefine our ambitions.

How to be success

You may be smart, you may be talented, you may be handsome, but you aren’t successful. After all, the guy that never was that gifted or never had great ideas and he has less brains than you, is now your supervisor!

How did that happen? Why do all of us with the knack to be great, never saw our dreams come true? And what is the common characteristic between successful people?

According to statistical researches, what divides successful people from non-successful is that the former had a particular goal in their life and worked hard to achieve it. On the contrary, people that had many goals and ideas, but spent more time talking about them than working on them, never managed to make their dreams come true. Continue reading “How to be success”

Why Setting Personal Goals Is Important

A lot of people like to learn how to be successful. They read books, listen to audio cassettes or even watch videos that tell them how to be successful in life. However most people fail to apply that knowledge, and as a result a lot of what they learn is ultimately wasted.

I know I am guilty of this myself. I once learnt about the importance of setting personal goals, but never applied that knowledge. For some reason I studied it, became interested in it, but took it no further. But later I then heard an expression that changed the way I looked at and ultimately used information I acquired.

That expression was, ìwhat’s the pointing of learning something, if you never use itî. As soon as I heard that saying, I realized that I had been learning lots of things, but never applying them in my life. Learning how to set goals, was one of those things.

So Why Is Goal Setting Important Anyway?

Taking the time to sit down and write out your personal goals is perhaps one of the most important things you can do for yourself. And incidentally, all successful people set themselves goals. That in itself should be a big enough reason to set them!

What Are Goals?

Goals are simply the things you want to do in life, and by writing them down you can clarify exactly what you want and how you are going to accomplish them.

Most people have a vague idea of what they want to achieve in life, and keep these vague ideas in their head. However, because they are vague ideas the action they take to accomplish those goals is also vague. And as a result, usually ineffective.

Personal Goals Will Focus The Mind

So writing down goals on a piece of paper allows you to decide exactly what you want to do in life. Once you know what you want to do, you can then create a specific plan of action to accomplish those goals.

It’s like giving yourself a map and compass to reach a certain destination in life. Without that map and compass you would most likely loose your way, and never get to where you want to go.

This is the real value of goals, as they help to give your life meaning, direction and a sense of purpose. With these things will also come a sense of control, which will also make you feel happier with yourself. You will be steering your life in the direction you want it to go, rather than being blown around like a leaf in the wind.

Set Yourself Some Goals!

So take some time to think about the things you want to accomplish in life. Write them down on a piece of paper, and create a plan as to how you will achieve those goals. It might just be the most important and valuable exercise you ever do.

 

Breaking Bad Habits Of Failure

People living today are extremely lucky. 50 years ago the internet never even existed, and cable TV was something you read about in sci-fi magazines. Now, thanks to the internet, you can find information on virtually anything you want, instantly. Something which was only a dream just 10 years ago.

Yet with all this information available to us, people still fail to become successful in life. Why is this? After all, there is so much self help information available telling us how to be successful, but most people still fail to achieve success. And why do people still suffer from depression, when there are so many books telling them how to live a great life?

The fact is, information is not the problem. And no matter how much technology advances, people will always have the same problems.

What Are The Reasons People Fail To Achieve Success?

If you ask someone why they never succeeded in what they were trying to do, they will most likely tell you it was someone elseís fault, or something happened that was beyond their control. However if you compare that persons life against someone else’s life, you could probably find many examples of people who suffered under far worse conditions yet still became a success.

This shows us that the real reason people fail is not because of something outside of them, rather the reason lies within.

Internal Reasons For Failure

When you continue to do the same thing over and over again it is called a habit. You are probably familiar with bad habits such as smoking, but are you familiar with the habits of failure or the habits of success?

 

Creating Habits Of Success

Since success or failure is ultimately achieved through the actions you take, habits therefore play a tremendous role in determining whether you will achieve success or failure in life. For example. If you read everyday, that is a habit. This habit is likely to expand your knowledge of a subject, and vastly improve the chances you will master and be successful at it.

However, let’s say that instead of reading everyday, you prefer to sit down and watch TV for a few hours. Do you think this will help you master any subject? Or become an expert in your field? In all likelihood, the answer will be no.

So if you look at achieving success or failure in terms of the actions you repeat on a daily basis, then it is quite simple to understand why some people succeed, and others complain of failure. People who are successful continually do things on a daily basis that will increase their chances of success. Whilst unsuccessful people do not.

This does not mean successful people never fail, they do. But what they don’t do is give up, because they have developed habits of success.

Change Your Habits!

The message you should take away from this article is that in order to experience change in your life you must first identify your habits. Think about what do you do on a daily basis, and ask yourself if those things help you achieve what you want in life?

If the answer is no, you must then change those habits, because by doing the same thing over and over again you will only get the same results over and over again.

Saying Yes

“All that man achieves, and all that he fails to achieve is a direct result of his own thoughts.” -James Allen

John Lennon, at the height of his popularity, had his heart captured by one simple word: yes. He was rich, talented, desired and loved by people all over the world and had the option of nearly any woman he wanted. And ‘yes’ was what did it for him.

He attended an exhibit in England and Yoko Ono was one of the artists. The piece in question was a ladder which led to a tiny sign and a magnifying glass. In order to see what was written on this tiny sign, one had to climb the ladder and look through this magnifying glass. It said, ‘Yes’.

It started with a yes. John later said he liked the piece so much because of it’s positive message. He said if it had been something negative, he wouldn’t have found Yoko or her work interesting in the least.

We all say ‘yes’ or derivatives of it every day (yeah, uh huh, ya). A positive response to a question or situation. Yes.

When we say yes, many times we are projecting an attitude and an affirmation, more than just agreement, and we are showing an openness and welcoming.

As a persuader, I love to hear ‘yes’.

Self awareness and attitude go hand in hand with persuasion. This requires that you “check in” with yourself and pay special attention to all the signs and feelings we experience.

There’s a young women who works at the cafe where I work sometimes. She has the ultimate ‘people suck’ attitude. ‘I’ll never get what I want. Why can’t I ever find a parking spot. I’m so fat. I’m always broke. . .’ Wow. This is not a ‘can do’ attitude. She is most certainly not saying ‘yes’.

By changing our loops, our negative tapes, for positive ones, and you’ll be rewarded immeasurably. It takes a lot of conscious work and can sometimes be uncomfortable.

There have been days when I let negative moods get the better of me. Sometimes it happens without you even knowing it. I’m not normally a complainer. I take action when action is warranted, but I had a bad day not too long ago where I was irritated by absolutely everything. I noticed the ugly paint job on the house down the street, I noticed the horrible driver in traffic. And then something happened that interrupted my (temporary) pattern of negativity. Someone just said, ‘Are you okay?’ It made me realize that, yeah, I had really been complaining a lot, it had been a bad day. I took a deep cleansing breath, checked in with myself, and intentionally readjusted my attitude. Presto! That ugly paint job was inconsequential.

Life happens. Part of life includes ‘bad’ things. We have the choice to respond with either positivity or negativity. Emotions are choices.

Charles Hannel, author of ‘The Master Key System’, (an incredible study in self-improvement and higher consciousness) said of attitude, “The predominant thought or the mental attitude is the magnet, and the law is that like attracts like, consequently, the mental attitude will invariably attract such conditions as correspond to its nature.”

As you begin to reorient yourself to a ‘yes’ attitude, you will get more ‘yes’ in return.

Conquering Fear

What really keeps you from living your dreams?

What problem is most dominant in peoples lives?

The answer is: FEAR!

People live every day in fear. Fear of losing their wealth, fear of losing their loved ones, fear of making the wrong decisions, fear of being themselves, fear of growing up, fear of making a commitment. The list goes on and on.

The leading cause of people not fulfilling their dreams is NOT the fear of failure – itís the fear of success! The fear of actually accomplishing what they set out to do. The fear of living life to the fullest may have paralyzed you. This will cause you to never really try in your business, or if you do try, to sabotage your efforts so you never have to face your fear of success.

Most people live their lives in the grip of this fear and they arenít even aware that it has control over them! The fear is the one thing that can turn your dreams of financial freedom, loving relationships, and a fulfilling and significant life into a pattern of habits including procrastination, self-sabotage and other bad habits.

Fear is the dominate problem in your life today. The two questions you need to answer to conquer your fear are:

Which fear has the most control over your behavior? Is it the fear of failure, the fear of rejection, the fear of success, or is it all of them?

How do I interrupt the bad habits that I have developed as a means of protection from this fear? How do I interrupt the programming I have within me?

These are the two most significant questions when it comes to overcoming your fears. If you can answer these two questions, your life will forever change!

The reality of fear is that it is human and is a part of life. Itís not going to go away. Some fear is even healthy! It is a gift given to you to keep you safe and bring you closer to your creator.

Every person is born with three instinctive fears. These are: fear of falling, fear of loud noises, and fear of abandonment. These three fears were given to you to help you monitor what is going on around you. Think about it; it is fear that gives you the adrenaline rush that makes you escape from a situation that is really, truly unsafe. It also gives you the same rush that causes you to fight to win.

Faith is born in fear. God knew in His infinite wisdom that fear is what would drive His people back to Him. Although sometimes it is only in times of extreme fear that we look to God and choose Him. Take a look at your own life and think about the times you looked to God for His power and wisdom. Those were probably times of extreme fear. True faith is born from fear!

So what caused the gift of fear to be the number one problem in society today? Why do people let fear control their actions, beliefs and lives? The answer is the difference between reacting to fear and acting in fear. It has everything to do with your belief system.

Children typically react instinctively to fear, which is appropriate behavior at this age. Most adults don’t make the distinction between reacting to fear, as when they were a child, and acting with their intellect when dealing with fear.

People react instinctively to fear by either denying it or running away from it. They miss the power that comes from acting with their intellect, never allowing the fear to become the gift it was intended to be. Learn to act with your intellect by exposing your true fears and the beliefs they represent and free yourself so you can move on with all you are meant to do, have and become!

 

Creative Imagination

Creative imagination is more than just active imagination. To be able to actively imagine things, to see and hear things in one’s mind, is an important ability. It doesn’t have to involve much creativity, though, does it? Daydreaming, for example, is a process of imagination. It can consist of an elaborate fantasy world, but one full of all the things that many people think about.

Creative imagination, then, has to include the ability not just to imagine things, but to imagine original things. It is seeing things that others don’t see, and coming up with new ideas. So how do you cultivate this?

Creative Imagination 101

First, exercise your basic imagination. It can be as simple as thinking in pictures more, or listening to music in your mind. Play little “movies” in your mind, until you can watch them on command. This is a simple process, but for those of us that can’t easily do it naturally, it can take a lot of practice. Fortunately, it is not an unpleasant activity.

The second part of developing your creative imagination is to get more creative in your thinking and imagining. Start by paying attention to your creativity. Our subconscious minds give us more of what we pay attention to. Ignore creative aspects of your life, and you’re telling your subconscious they are unimportant. On the other hand, if you note when you’re creative, your subconscious mind will start feeding you more creative ideas.

Different surroundings can also encourage your creativity. Want more creativity in your love life? Hike up a mountain with your partner. Do you write? Try sitting on a roof to write. Want new ideas for your business? Take a notebook to the park and sit by the duck pond. A change of environment can get your thinking out of it’s ruts.

You can play games that exercise your creative imagination. One such game uses a technique called “concept combination.” Alone or with other players, you combine random concepts or things in new ways, to see who has the best idea. A thermometer and a billboard, for example, could generate an idea for a sign that checks the weather and adjusts the message accordingly (“Come in out of the heat for a cold beverage,” or “Come in out of the rain and warm up with our gourmet coffee.”).

Don’t Wait For Creative Imagination

Creative inspiration certainly can strike at any time, but it strikes more often when there is work instead of waiting. So if you want to come up with creative inventions, start mentally redesigning everything you see. Imagine a better bicycle, a faster mail service, or a better chair. Continue this for three weeks, and it will become a habit.

Of course, creative imagination goes beyond solving specific problems or inventing things. Truly creative minds are always coming up with the questions too, not just the solutions. If you want to be more creative all the time, focus on three things:

1. Changing your perspective. A child might think that working just to not work (to retire) is silly. Thinking from that perspective might give you ideas for how to make money doing things you enjoy. Seeing the world as a bear sees it might give a painter imaginative new ideas. Looking at things from a customer’s perspective is a sure way to find creative improvements for a business. See everything from several perspectives.

2. Challenging your assumptions. What if restaurants didn’t have employees? Visitors pay a machine as they enter, feed themselves at a buffet, and everything is as automated as possible, so one owner-operator could run a large restaurant alone. Challenge all your assumptions for practice. Do you really have to pay rent? Do swimming pools need water? Can exercise be a bad thing?

3. Let your ideas run wild. Does a flying bed seem silly? It could lead to the concept of a helium mattress. When you get off it in the morning, it floats out of the way, up to the ceiling. Perfect for small apartments. Don’t stifle your creativity. Relax, and let ideas come. You can always discard them later.

For these techniques to be a habitual part of your thinking, use them regularly. Since it takes several weeks to develop a habit, remind yourself to use them each day. Jot a few of your favorite techniques on a card and carry it with you. Look it over throughout the day and apply the techniques to anything. Soon, you’ll have a more creative imagination.