-
Recent Posts
- Problems connecting to unix:///var/mysql/mysql.sock
- Using rails and respond_to to include nested data
- Handle different environments with PHP
- MySQL 5.5, Mac OS X and startup item security error
- Rails plugin development using WebMock
- Read more, continue reading, and how to easily fix it using WP
- Windows clients with CUPS and Samba
- Making a Cafe Latté without a “do it all” machine
- Using form_tag and collection_select with Rails3
- Switching coffee and PHP testing
Tags
ajax apache api authentication cakephp coffee configuration cups cxf daily365 design firebug gedit hibernate history java javascript jcs job language linux mac mvc mysql non-tech opensource paginate php plugin projects prototypejs quick tip rails ror ruby samba smashingmag snapopen spring terminal test twitter usability wordpress wpml
Tag Archives: ror
Using form_tag and collection_select with Rails3
After being away from rails for a while, i’m coming back en version 3 to check it all out again.
I had a problem with how to create a simple select, using the FormHelper.
I had two models, a user and a customer. They are defined as follows:
class User < ActiveRecord::Base belongs_to :customer end
class Customer < ActiveRecord::Base has_many :users end
Continue reading “Using form_tag and collection_select with Rails3″ »
Using link_to in rails with :confirm and :method
Every time i’m going to use the link_to method in rails, I always seem to get a lot of errors. The documentation states: link_to(name, options = {}, html_options = nil) link_to(options = {}, html_options = nil) do # name end …
Continue reading “Using link_to in rails with :confirm and :method” »
Use Rails’ form_tag with care
Today at work I was fiddling with some forms in an admin interface. When I had to make an update form, the data didn’t hit the correct controller action.
If you ever get the message ActionController::MethodNotAllowed, then you’ve created your form wrong!
Continue reading “Use Rails’ form_tag with care” »