search for: ojb

Displaying 2 results from an estimated 2 matches for "ojb".

Did you mean: obj
2006 Sep 29
1
Rails validation scheme: why not validate params directly.
Hi. There are many ways of doing validation but I''m trying to think of the cleanest way without making the action code unclean. Would it be advisable to do validation on the incoming params hash rather than waiting to setup an object you are about to save and calling ojb.valid? before saving? Or even going as far as trying to save the object but failing from the model''s validation scheme? Handling errors - How do people display errors cleanly? Do they use flash[:notice] in a try/catch block in the action to catch the validation exception? Any help...
2006 May 15
11
can you explain this benchmark?
I want to load about 14000 words (a subset of /usr/share/dict/words) into a MySQL table in a migration: class CreateWords < ActiveRecord::Migration def self.up create_table :words, :force => true do |t| t.column :word, :string end say_with_time ''loading words...'' do words = File.join(RAILS_ROOT, ''db'',