Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 16:59:00 GMT)

Adding AJAX to your existing RAILS app

Posted by Sat, 02 Apr 2005 07:23:00 GMT

As of Rails 0.11.0, the Rails team has added Ajax support into the framework. Tha’ts right, you don’t need to spend a bunch of time reading through the Ajax fundamentals to get it integrated into you application. The Rails team has made this very simple to utilize.

First of all, make sure you have at least Rails 0.11.0 (about a week old as of today). Next, open up one of your rhtml files (example: standard-layout.rhtml if you followed one of the cookbook tutorials).

Add the following line inside the <head> of your html file.
  &lt;%= define_javascript_functions %&gt;

Now in one of your controllers, add your new method.

  def myrandom
    render_text SomeModel.gen_random(10)
  end

In this example, SomeModel is a model that has a method called gen_randomrubyurl.com).

The last piece is to add the following to my rhtml file:

&lt;div id="myrandom"&gt;x&lt;/div&gt;

&lt;%= link_to_remote "Generate Random", 
    :update =&gt; "myrandom", 
    :url =&gt; { :action =&gt; "myrandom" } %&gt;

Now, you should be able to run your RAILS app and it will display a button for me and when I hit ‘Generate Random’ it replaces the <div> content with the random string.

Yep, that’s all it took to add a non page refreshing action to your script. Of course you can do a lot of cool things with AJAX and this wasn’t one of those cool things… just a quick example. :-)

Lucas shares his secrets

Posted by Sat, 02 Apr 2005 00:54:04 GMT

Lucas Carlson has posted on his blog an entry called, How to Make a Living Programming in Rails which pretty much explains the main steps that you should take when you want to be a freelance developer in the open source world. ( I don’t know if these same base rules work in the proprietary world..so I can’t say if it does or not).

A few things to add to his top 5 list would be to participate in the mailing lists (google indexes that) and get your name out there. In my PHP/PostgreSQL consulting career, many people come to me because they found a code sniplet, or a mailing list archive where I answered a similar question from someone else… these all leads to contacts and potential customers.

As my Ruby/Rails experience is still growing but I have picked up on some of the fundamentals fairly quick, I have been working on a few client projects and one product that will be launched by my company, PLANET ARGON sometime in May or early June.

I hope to meet Lucas in a few weeks when he presents Ruby/Rails at FreeGeek. It’s good to see that there is an active development group in the Portland, OR area.

Lucas shares his secrets

Posted by Sat, 02 Apr 2005 00:54:04 GMT

Lucas Carlson has posted on his blog an entry called, How to Make a Living Programming in Rails which pretty much explains the main steps that you should take when you want to be a freelance developer in the open source world. ( I don’t know if these same base rules work in the proprietary world..so I can’t say if it does or not).

A few things to add to his top 5 list would be to participate in the mailing lists (google indexes that) and get your name out there. In my PHP/PostgreSQL consulting career, many people come to me because they found a code sniplet, or a mailing list archive where I answered a similar question from someone else… these all leads to contacts and potential customers.

As my Ruby/Rails experience is still growing but I have picked up on some of the fundamentals fairly quick, I have been working on a few client projects and one product that will be launched by my company, PLANET ARGON sometime in May or early June.

I hope to meet Lucas in a few weeks when he presents Ruby/Rails at FreeGeek. It’s good to see that there is an active development group in the Portland, OR area.

Mac the right way to go?

Posted by Wed, 30 Mar 2005 21:02:17 GMT

Curt Hibbs announced his blog this morning and it was due to a post on Loud Thinking, where he mentioned a Paul Graham post about the Mac adoption amongst hackers. In David’s post he made the following comment, While I can certainly understand the reasons why some people go with Linux, I have run all but dry of understanding for programmers that willfully pick Windows as their platform of choice. I know a few that are still stuck in the rut for various reasons — none of them desire.

Curt responded in his personal blog on this as David had shut off comments on the entry after getting a bunch of harsh responses. Curt made a few good points on how David’s comments were not very fair to people as he made a lot assumptions that yes people do get stuck working in a Windows environment, but to proclaim that none of it is from desire is kind of missing the bigger picture. If people are using Ruby/Rails on any system is better than not at all. I would assume that the majority of people using Rails are probably Windows users and it’s another good way to lure people off of the Microsoft boat.

Don’t get me wrong, I think it’s pretty and all, but if you have ever seen my desktop, you’d know that I never see my desktop unless you see the background coming through my transparent terminal screens. So, what does OSX offer me as a Linux user that I don’t already got? The only thing that I was able to think of was, Safari for testing and Photoshop? I’m not a designer, so thats a non-issue for me.

I have a good friend who is working in a .NET world and is learning Ruby/Rails. He is able to migrate to Linux for the cost of a few CDRs and he’s already playing around with Linux for the first time. He cannot abandon his x86 hardware for Apple hardware overnight and I think this holds true for most people.

However, I would never tell him that he is a bad programmer for choosing to work in the Windows world, it’s not something that I wanted to do anymore, but I made the change on my own. I hope that David is better able to explain why he felt it necessary to condem a huge portion of the work force, who are taking interest in his work. Don’t piss them off, they might take that into consideration when choosing to use your business or not.

Having said that, if you use any computer, you suck. :-p

Besides, when I think of a typical Mac user, I think of Best of Show.

Best in Show

Disclaimer: As always, I forgot to hit the sarcasm button

Mac the right way to go?

Posted by Wed, 30 Mar 2005 21:02:17 GMT

Curt Hibbs announced his blog this morning and it was due to a post on Loud Thinking, where he mentioned a Paul Graham post about the Mac adoption amongst hackers. In David’s post he made the following comment, While I can certainly understand the reasons why some people go with Linux, I have run all but dry of understanding for programmers that willfully pick Windows as their platform of choice. I know a few that are still stuck in the rut for various reasons — none of them desire.

Curt responded in his personal blog on this as David had shut off comments on the entry after getting a bunch of harsh responses. Curt made a few good points on how David’s comments were not very fair to people as he made a lot assumptions that yes people do get stuck working in a Windows environment, but to proclaim that none of it is from desire is kind of missing the bigger picture. If people are using Ruby/Rails on any system is better than not at all. I would assume that the majority of people using Rails are probably Windows users and it’s another good way to lure people off of the Microsoft boat.

Don’t get me wrong, I think it’s pretty and all, but if you have ever seen my desktop, you’d know that I never see my desktop unless you see the background coming through my transparent terminal screens. So, what does OSX offer me as a Linux user that I don’t already got? The only thing that I was able to think of was, Safari for testing and Photoshop? I’m not a designer, so thats a non-issue for me.

I have a good friend who is working in a .NET world and is learning Ruby/Rails. He is able to migrate to Linux for the cost of a few CDRs and he’s already playing around with Linux for the first time. He cannot abandon his x86 hardware for Apple hardware overnight and I think this holds true for most people.

However, I would never tell him that he is a bad programmer for choosing to work in the Windows world, it’s not something that I wanted to do anymore, but I made the change on my own. I hope that David is better able to explain why he felt it necessary to condem a huge portion of the work force, who are taking interest in his work. Don’t piss them off, they might take that into consideration when choosing to use your business or not.

Having said that, if you use any computer, you suck. :-p

Besides, when I think of a typical Mac user, I think of Best of Show.

Best in Show

Disclaimer: As always, I forgot to hit the sarcasm button

Away for the past week

Posted by Sun, 27 Mar 2005 20:09:55 GMT

I was on vacation in California all last week. Just before I left, we announced our new hosting plan rates. We have upgraded our disk space and bandwidth allocations for each package level. We have had a nice response to our affordable <a href=http://www.rails-hosting.com/ >rails hosting packages. One thing that I have noticed is that several of our new customers are fairly new to Rails and they like that we set them up with a vanilla Rails install in their account and they don’t need to do anything to get it up and running. This is all free and included in our hosting plans.

Along with this, you also get our expertise in hosting PostgreSQL. Every customer has their own private instance of PostgreSQL (you get your own port and have remote access). This allows us to be flexible with what version of PostgreSQL you want to run (7.3, 7.4, 8.0.1, etc).

If you’re looking for <a href=http://www.rails-hosting.com/ >ruby on rails hosting, take a look at our rates before you make your final decision.

Older posts: 1 ... 94 95 96 97 98 99