Forms in Ruby on Rails - Part 2
July 11th, 2007
In the previous installment, we learned about two of Rails’ methods that help create forms, form_for and remote_form_for. Those methods dealt with forms primarily based on Model data. Today we’ll turn our attention to form_tag and form_remote_tag which create more generic forms not tied to Model data.
Tutorial after the jump…
Read the rest of this entryForms in Ruby on Rails - Part 1
July 8th, 2007
I was confused for a pretty long time about how to create forms in Ruby on Rails. Since many (most?) Rails applications are tied to databases, it makes sense that many interactions with model data will be done via HTML forms. My problem though, was that there just seemed to be too many choices, and the choices are poorly named.
Tutorial after the jump…
Read the rest of this entryRubyNoob Reborn!
June 28th, 2007
After months and months of neglect, primarily due to the fact that I’ve had tons of problems getting Typo to run properly on Dreamhost, I have finally revived RubyNoob running in Mephisto! RubyNoob is up and running on a slice from SliceHost, being served by Litespeed.
I’m planning on writing up some guides on how I did the transition from Typo and Dreamhost to Mephisto and Slicehost, but first I’d like to thank Paul over at UsefulJaja for creating the incredible tutorials that I followed in setting up my new slice.
As I’m writing this, the new RubyNoob is using the plain generic Mephisto theme. I’m planning on slowly evolving my own theme over the next few months. I’m hardly a web designer or expert in CSS, but it’s time that I learn and what I’d like to do isn’t really anything spectacular or complicated.
Since my last useful posts I’ve learned a lot of stuff about Ruby on Rails. I’ve added a full e-commerce solution to JoyLi.net by integrating it with Google Checkout. That was a great experience and I’ll be writing about that as well.
If you’re reading this, you’ve found your way to the new RubyNoob (or your RSS subscription actually figured out what happened and I’m amazed) and I’d like to thank you for stopping by. Let’s hope I keep the ball rolling from here on out!
Note: all comments since the migration have been given the date of the migration, sometime in June 2007. Please ignore all the comment dates.
Rails + Errors + FastGI == Bad
January 24th, 2007
One way to generate a lot of “500 – Application Failed” errors in Ruby on Rails applications running on Dreamhost is by throwing a lot of errors. Right now my newly downloaded Typo (supposedly the most recent stable version) is throwing some errors and this is, in part, causing RubyNoob to keep going down.
I’m investigating this to see what I can figure out. My advice is, if you’re running Rails on Dreamhost and you keep getting application failure errors, the first place to look is your production.log file. Make sure to clear up all errors first.
I’ll talk about what else you can do once I get RubyNoob a bit more stable.
Windows is Evil
January 24th, 2007
Simple lesson for other Ruby on Rails noobs – editting dispatch.fcgi in Windows and then uploading to your website may be hazardous for your site!!
Although I haven’t had other issues with doing so, after totally destroying RubyNoob over the past few days, I’m always going to do any editting of dispatch.fcgi through my Dreamhost shell! Apparently some invisible characters can get into your file and keep your site from starting up.
I’ve also updated to the latest and greatest typo, but in the process I’ve lost the comments for the 4 or 5 most recent posts – and that sucks. I’ll see what I can do to resurrect them – or at least the ones worth bringing back.
I have an interesting article coming soon about Dreamhost and Ruby on Rails and Applications failing to start. I’m going to try to make the changes I’ll be mentioning and we’ll see if RubyNoob becomes more stable.
The 20 Coolest Ruby Apps You've Never Heard Of
July 13th, 2006
Actually, I have heard of a few of these. BillMonk is a pretty darned cool idea for the younger, poor college aged crowd. CommunityWalk is another of my favorites, but I didn't realize it was written in Rails.
Blogged with Flock
More fantastic resources
July 9th, 2006
Excellent RJS Reference List
July 5th, 2006
How to Send Files in Rails
May 19th, 2006
First, put the file out on your server. I put my "README.txt" file in a "files" folder like this: "rails/ appname/files/README.txt."
Next, set up a link in one of your pages:
1 2 |
<%= link_to 'Get Readme', :action => 'get_readme' %> |
1 2 3 4 |
def get_readme send_file("files/README.txt", :filename => 'yo_readme.txt') end |
There are other options like the :filename option which allow you to tell the browser what type of file to expect, how to display the file, and whether or not to stream the download. Streaming is turned on by default and allows downloading of very large files. All of these options go into the same line of code. Take a look at the article at this link.
As usual, expect a quick video demonstration of this posted later tonight.
Rails Custom URL Tutorial
May 18th, 2006
For instance, let's say that I get a list of my del.icio.us links tagged with the word "ruby." I edit them in whatever way I feel like, and then save my creation along with a keyword that I choose - let's say "ruby" for simplicity.
I don't want my users to have full access to the admin sections of my application - they'll only have access to create and update their query results. So, I want to give them the ability to use their keyword as part of the url. So it'll be something like http://delipaste.com/saved/ruby.
Read the rest of this entry
Simple Rails RJS Tutorial
May 13th, 2006
Read the rest of this entry
Video of my Delicious App
May 9th, 2006
Please leave me a comment and let me know what you think!
Test
How to add groovy Scriptaculous effects
April 25th, 2006
Read the rest of this entry
HowTo add Ajax in-progress indicators
April 24th, 2006
So, we need a way of letting the user know that something is happening and that they ought to wait a bit. Today, the standard seems to be an animated spinning icon:
Read the rest of this entry
RubyNoob gets all Ajaxy
April 23rd, 2006
"How I got some cool Ajax stuff to work with Ruby on Rails"
This weekend, my goal was to get my first original Ruby on Rails application working on my development box. I have achieved at least some sort of success! My app, such as it is, allows a user to enter a tag from her del.icio.ous account and then the app calls the del.icio.us REST API for that tag, strips out the html links and puts them into a text area. The user can then edit the text returned and save the tag/results combination into the database. It's not too exciting, but it's been a lot of fun to get together.
Read the rest of this entry