Displaying 3 results from an estimated 3 matches for "entity_names".
Did you mean:
entity_name
2008 Apr 08
1
Help with primary_key_prefix_type
I put this config in environment.rb
# Use table_id instead of id for primary key.
config.active_record.primary_key_prefix_type =
:table_name_with_underscore
I have this migration:
class CreateEntities < ActiveRecord::Migration
def self.up
create_table :entities do |t|
t.string :entity_name, :null => false,
:limit => 40
t.string
2008 Mar 08
9
Validation error handling on related models
I have 2 models, entity and client. Entity has_one client and client
belongs_to entity.
Entity has attributes name and legal_name. Entity also has an unique
index on (lower(name)). The pKey for both is the conventional Rails id.
Client has a fKey constraint on entity_id and is indexed in entity_id.
In controllers/clients_controller.rb I have:
# GET /clients/new
# GET /clients/new.xml
2010 Sep 30
5
response.should have_text leads to undefined method `has_text?'
One of my controllers directly renders some JSON output that I would
like to test with RSpec. For that I use ''response.should
have_text("foobar")'' in my spec file, but that leads to a
Failure/Error: response.should have_text("enim")
undefined method `has_text?'' for #<ActionController::TestResponse:
0xb6736944>
I read here somewhere that webrat