similar to: custom table_name for table users with devise

Displaying 20 results from an estimated 100 matches similar to: "custom table_name for table users with devise"

2006 Aug 11
0
habtm in a standalone ruby script broken?
Hi, i have a ruby script which uses the activerecord models of my rails application. this is achieved with $LOAD_PATH << ''...../availdb/app/models'' require ''rubygems'' require_gem ''activerecord'' require ''host_downtime'' require ''host_scheduled_downtime'' And in .../app/models/host_downtime.rb: class
2006 Jan 26
0
Bug with table_name_prefix?
Hi all, I think I have found a bug in ActiveRecord''s handling of eager loading when using table_name_prefix. Here is a reduction of the problem : class Cheese < ActiveRecord::Base ## ## id SERIAL ## name VARCHAR(32) ## county_id INTEGER ## belongs_to :county def self.table_name_prefix "stuff_" end end class County
2007 Jun 19
2
sequence name prefix
In Postgres, I use different database schemas for each application, by declaring, e.g.: class ApplicationController < ActionController::Base ActiveRecord::Base.table_name_prefix = "keywords." end I assumed that the sequence names were also prefixed with the database schema names, e.g. keywords.things_id_seq But Rails 1.2.3 assumes the sequence is *NOT* in the same schema as the
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such column: books.user_id: SELECT "books".* FROM "books" WHERE ("books".user_id = 4)" ,which sounds like there is no user_id in books table.So i just installed foreigner plugin and added " t.integer :user_id, :null => false" and "add_foreign_key(:books, :users)" in book
2013 Mar 09
1
Rails- Devise- confirmable- confirmation email not received
In an application I use devise authentication. I added confirmable.During sign up, message is that email has been sent. But email is not received in my gmail account. How can I solve this problem. Do I need to add other options as we do with actionmailer such as gmail port address, or sendmail such things. Please help. -- You received this message because you are subscribed to the Google
2005 Oct 29
0
Re: Multiple rails instances, single database
Thank you very much, James Adam On 10/29/05, rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org <rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> wrote: > Date: Sat, 29 Oct 2005 09:23:05 +0100 > From: James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Subject: Re: [Rails] Multiple rails instances, single database > To:
2011 Apr 15
2
sti + namespace
I''m spidering historical weather data from various sources. I have a WeatherStation class that is begging for an STI implementation: a WeatherStation is associated with a specific weather service, and each weather service has its own protocol for fetching weather data, but most of the code is can be shared in the WeatherStation parent class. Ergo STI. But there are a lot of weather
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday. I would go to the root of my site and I would get a Too Many Redirects message. It seems like there was an infinite loop. After struggling for over an hour yesterday late at night, it seemed like I fixed it. But now, when I want to create a New User, it''s redirecting me to the Sign In screen. Seems like I didn''t fix the problem completely. I
2007 Sep 05
8
Hi..Guys new plugin again
Hi.. Guys new plugin again Foreign Key Associations is a plugin that automatically creates associations based on foreign-keys. The associations are created at runtime-ie. as your ActiveRecord models are loaded-so they will always be up-to-date. For example, given a foreign-key from a customer_id column in an orders table to an id column in a customers table, the plugin creates:
2011 Aug 09
0
Devise, RSpec and Webrat
My app is builded with rails 2.3.12, rspec-rails 1.3.2, webrat 0.7.3. My spec_helper.rb ENV["RAILS_ENV"] ||= ''test'' require File.expand_path(File.join(File.dirname(__FILE__),''..'',''config'',''environment'')) require ''spec/autorun'' require ''spec/rails'' require
2007 Oct 31
1
how does table_name static method work ?
There has to be a simple explanation for this. I can do this to get the table name behind a model >> User.table_name => "users" Great. But looking at the table_name code in active_record/base.rb, the table_name method is not static (no self.)! def table_name reset_table_name end So why can I call table_name as a static method ???
2008 Jul 19
0
undefined method `table_name'
Hi I''m relative new to RoR - but I''m having a problem with some model relationships that I thought should have worked. Hope someone can help. The code... MODELS: class Delivery < ActiveRecord::Base belongs_to :vehicle end class Vehicle < ActiveRecord::Base has_many :deliveries def self.find_all_active Vehicle.find(:all, :order => ''name'',
2007 Dec 08
3
ROR 2.0 & undefined method `table_name'
Hi all, I''ve got stuck with this. Here''s the error message: NoMethodError in Account#index Showing account/index.rhtml where line #4 raised: undefined method `table_name'' for Upload:Class Extracted source (around line #4): 1: <h1>My account</h1> 2: 3: Login name: <%= current_user.login %> <br /> 4: Files uploaded: <%=
2011 Nov 05
13
Adding a site admin user while creating a site
Hi Gurus, I wanted to add siteadmin user(basically a user with a certain role) while creating the site itself. I hope that i have done all the necessary stuff by going through raynb''s railscasts ( http://railscasts.com/episodes/196-nested-model-form-part-1) But could not see user fields being displayed in the site creation form.. Below are the details. I Have two model users and
2006 Apr 11
2
AR class names
hello all, quick question: how can I find out if a given string matches the name of an ActiveRecord derived class? thanks in advance alan
2007 Aug 07
4
Execute additional commands after creating database?
I''m writing some code that accesses some lagacy database on PostgreSQL. Since the old database had some really ughly and weird naming conventions (like CamelCase). To work around this I created a second schema (named rails) in the same database and gave the tables and fields some rails-friendly names. The database user that Rails uses has its search_path set to the rails schema. That way
2006 May 15
8
set_table_name and self.table_name
I have some legacy tables that I used set_table_name on, I''m attempting to write a method that will get key value from a sequence table and then update it and return a value. I''m hoping to put this in the base ActiveRecord method so I would like to reference the table name with self.table_name or something... class Contacts < ActiveRecord::Base set_table_name
2007 Jan 23
11
dynamic tablenames
Hi List! May I tap into your combined common sense ? I have a legacy logging app that needs to be modernized. At the moment, Data is going to be stored in 5 tables, one table is going to contain more than 200 million and 2 others about 60 million rows. Mysql will be used, unless someone sees a major advantage in using something else (at the moment data is stored in a raw positioned file format,
2010 Oct 31
4
Newbie - Rails 3 authentication question (Devise)
Hello! I''m working on my first Rails app and I have a question regarding authentication. I already have authentication for signing up, logging in, logging out, etc. What I need is an account email activation function and a reset password (forgot password) function. I have read a little bit about Devise and watched the Railscast episodes on it, it seems nice, but is it possible to add
2007 Mar 21
6
ORACLE DESC "table_name" Failure
I am getting "DESC CYCLEMSTR" failed; does it exist? errors on a table named CYCLEMSTR in Oracle every 3 out of 4 trys to do a simple find(:all) on the table. It is a legacy table that only contains 12 rows of join information. I don''t understand why it works one out of every 4 or 5 times help please. trace: (eval):3:in `describe''