RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: bhopwood
Rails 4.0.0.beta1 seems to have dropped the 'new -b' option for using app builders. Does anyone know if this will be the case in production, or is it just a case of 'work in progress' ?
OK guys, please ignore this comment.
The whole thing is more complicated than I thought.
1. It seems that making an Account (or Tenant) controller confuses the picture.
2. Has anyone handled the situation where the subdomain is not present ?
I'm having a bit of an issue with this. I am using 'Account' rather than 'Tenant' but otherwise everything is as the example.
When I do 'db:migrate --trace' the first time I get -
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Invoke multiaccount:db:migrate (first_time)
** Invoke environment
** Invoke db:load_config
** Execute multiaccount:db:migrate
PG::Error: ERROR: relation "accounts" does not exist
LINE 4: WHERE a.attrelid = '"accounts"'::regclass
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"accounts"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Has anyone else encountered this issue ?