similar to: Where to put array to be shared across models.

Displaying 20 results from an estimated 4000 matches similar to: "Where to put array to be shared across models."

2007 Jan 16
4
Subdomain Account Keys Best Practice
Hi all, I''m thinking of useing sub-domains as account keys, something I''ve played with previously. I have accounts and users, fairly standard, except that users can belong to many accounts, and accounts can have many users. So I figure I need to have an area on the main domain, that allows users to view their account memberships and things. Sort of like a dashboard for each
2006 Jan 11
2
validator to ensure two fields are different?
What validator can I use in a model to ensure that my :username field is different from my :password field? I''ve tried validates_exclusion_of :password, :in =>:username but I get a rails error "an object with the method include? is required must be supplied as the :in option of the configuration hash" Thanks! Gary
2006 Aug 14
3
case insensitive exclusion_of
I have the following validation code, however it will allow variations in case. Like ''Admin'' and ''admiN'', etc validates_exclusion_of :login, :in => %w( admin ), :message => "is reserved for system accounts" how can I make this validation case insensitive? -- Posted via http://www.ruby-forum.com/.
2016 Sep 20
1
Windows 10 update kills samba access
On 09/20/2016 04:09 PM, Bob of Donelson Trophy via samba wrote: > On 2016-09-20 15:00, James Knott via samba wrote: > >> On 09/20/2016 03:54 PM, Bob of Donelson Trophy via samba wrote: >> >>> All of us are having trouble with the "Anniversary update" to W10 >>> Version 1607. If you can roll back to previous Version 15?? (sorry can't >>>
2012 Sep 16
1
“Routing Error No route matches {}” when omniauth failed on registration
(Original question was asked here: http://stackoverflow.com/questions/11506734/routing-error-no-route-matches-when-omniauth-failed-on-registration ) I am using omniauth-identity and configure its "fail on registration". My files: config/initializers/omniauth.rb OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do #... provider
2006 Jan 20
3
Is there a way to validate a model w/o saving it?
I have some code in my controller which looks like this: if request.post? and @account.save and @user.save ... end and in my Account and User models I have many :validates, like so account.rb validates_presence_of :subdomain, :on => :create validates_uniqueness_of :subdomain, :on => :create, :message => "is already being used" validates_exclusion_of
2006 Mar 08
6
best practices for handling uploaded images and capistrano
Quick question: I am going to use the file_column plugin to manage uploading thumbnails. By default the images are stored in the public/ dir of the rails project. The problem I see is that when capistrano redeploys a new build and symlinks it in none of the images will be in the new public/ dir... Does anyone have a solution for this? Thanks, Zack -------------- next part -------------- An
2006 Mar 16
5
TimeZone, TZInfo, daylight savings, and composed_of
Does anyone know the best way to track time zone information. There doesn''t seem to be much documentation on this. So far it seems like a simple db field like create table accounts ( id int unsigned not null auto_increment, name varchar(50) not null, time_zone varchar(50) not null, ... primary key (id) ) and a class like class Account < AR ...
2006 Apr 21
1
Catch authentication result from a model in a controller
Im still following the authorization recipe from the book, now all works fine but im getting trouble in how handle the model authorization result, if the user and pass are correct, it goes to a welcome screen(admin.rhtml) but if wrong the model prints a message in an ugly exception like page "usr and pass not correct", i want to redirect the user to the login
2008 Sep 12
1
restful_authentication rspec failures "Mysql::Error: Incorrect datetime value:"
I am getting 193 failures that all have "Mysql::Error: Incorrect datetime value:" how do i fix this??? i am new to rspec and restful_auth, so if i am doing something wrong, let me know!!! windows xp rails 2.1.1 rails testproject cd testproject # create my databases and edit database.yml git init git submodule add git://github.com/dchelimsky/rspec.git vendor/plugins/ rspec git
2011 Apr 21
1
Rails 3 Foreign Domain routing - cannot get this to work!
Hello, I''m trying to build an app (mysuperapp.com) that allows users to create an account in which a default subdomain (IE: joeshmoe.mysuperapp.com) will be created as their homepage. In their profile settings, I also want to give them the ability to add their own domain name so their homepage now can be joeshmoe.com. I know this is possible in rails w/ plugins like subdomainfu
2006 Jul 11
4
validates_unlike plugin
Validates Unlike Plugin (v 0.1) ======================== Validates Unlike plugin validates that the value of the specified attribute doesn''t match against the regular expression provided Class Contact < ActiveRecord::Base validates_unlike :comment, :with =>/html|http|onclick|onmouseover/ , :message => "comment can''t include: href,http,onclick,onmouseover."
2009 Jun 22
4
modal validation not works
Hi everyone, i have 20 fields in users table. in my admin profile module the admin can modify his infomation. but only 12 fields he can able to modify. so in my controller if params[ :profileinfo ][:first_name] @profileinfo.update_attribute(:first_name,params[ :profileinfo ][:first_name]) end the above simply saves what i enter into the field.why it doesnot consider the modelvalidation.
2016 Sep 20
2
Windows 10 update kills samba access
On 09/20/2016 03:54 PM, Bob of Donelson Trophy via samba wrote: > All of us are having trouble with the "Anniversary update" to W10 > Version 1607. If you can roll back to previous Version 15?? (sorry can't > remember) that MIGHT correct your issue. No promises. It's definitely that update that caused the problem.
2006 Apr 04
3
uuidtools across processes
Hello, It seems that there is a small probability of collisions among uuid''s produced by uuidtools'' UUID.random_create() running in concurrent user processes on a host (fcgi)? The ~2 bytes extracted from the randomized clock_sequence make a collision unlikely. http://rubyforge.org/frs/download.php/8572/uuidtools-1.0.0.zip Do I miss something? DD -- Posted via
2017 Aug 15
2
Shiny install failed
Very New to R trying to get setup but when i try to install shiny i get trying URL 'http://cran.rstudio.com/src/contrib/shiny_1.0.4.tar.gz' Content type 'application/x-gzip' length 2329723 bytes (2.2 MB) downloaded 2.2 MB Warning in install.packages : running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l
2017 Aug 15
1
Shiny install failed
Yes windows How can i install from zip? Here is my command > install.packages("shiny") Installing package into ?C:/Users/Zack/Documents/R/win-library/3.4? (as ?lib? is unspecified) There is a binary version available but the source version is later: binary source needs_compilation shiny 1.0.3 1.0.4 FALSE installing the source package ?shiny? trying URL
2017 Aug 15
0
Shiny install failed
Dear Zack At a guess you are on Windows and instead of installing from the zip file you are trying to install from source. If you do not grasp the difference try posting again showing us exactly what command you used and confirm your operating system Please also post in plain text not HTML as your message may get scrambled in transit. On 15/08/2017 14:11, Zack Haney wrote: > Very New to R
2006 May 02
4
How to extend rails rake tasks?
Does anyone know how to extend the buit-in rake tasks like test:unit. I want to custom load some fixtures in a particular order. Thanks, Zack
2006 Aug 07
5
RJS Change Background Color
What''s the page.method to change the background color of a DOM element? I''m trying to change the background color of a couple of styled <li>''s when an Ajax link is clicked. Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/63de04bf/attachment.html