similar to: Overriding validation?

Displaying 20 results from an estimated 1000 matches similar to: "Overriding validation?"

2006 Apr 08
16
International characters
I am new to Ruby on Rails. I have read a lot, and bought several books, and now I have started to implement a modified "shopping cart", following the AWDWR-book, with modifications to suit our application (subscriptions and memberships). Having done up to chapter 7 I have had no real problems, except one: Since our customers are Swedish I need the screen names, texts etc to be in
2006 Apr 23
2
Check if current route == some route
I have a before_filter in ApplicationController in which I want to check if the current location is the same as a certain route, so that I only redirect non-logged in visitors to the "join" page if they''re not on that page already. The code I came up with is a bit ugly: redirect_to join_url unless (@logged_in or action_name == "join") I''m pretty sure
2006 Mar 27
2
very easy ruby lang question...
irb(main):035:0> 0xb0 => 176 irb(main):036:0> "\xb0" => "\260" why defferent?
2006 Apr 23
13
post() to other controller in functional test?
In a functional test, I want to call an action in another controller (a login) before testing things in the current controller. As far as I can tell from the extremely sparse documentation and the AWDR book, this seems to be impossible. The post() functions takes an action argument only, and that''s that. Surely I must be misunderstanding things? -- Calle Dybedahl
2004 Aug 09
1
linear regression
Dear Consultant I've done linear regression successfully on R a few times before. But this time it keeps telling me:- "Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases" The model is:- fm1 <- lm(TS.CM ~ AGE + SEX + HFE.Y.01 + TFC2B.01 + HFE.Y.01*TFC2B.01, data = IRONresults, subset = DIAG2.1D == 0) summary (fm1) TS.CM is a
2004 Apr 08
3
Asterisk Server Crashing with New Application
Dear All, I have been running a successful and very stable call center PBX based on 0.7.1 release. I need to be on this release because of a number of features that I have complied from 3rd party patches, for the call center. I will not be able to upgrade to release 1 until the patches catch up and I have done the required testing. The system was very stable until two days ago. The changes made
2004 Mar 18
5
Samba and Active Directory Permissions
All, I am currently running Samba 3.0.2a on a RHEL3 server. I would like to use the extended file systems permissions through windows, but I haven't had much luck. Here is how I am set up.... My linux box is joined to my AD domain and appears to be functioning correctly. I also have winbind set up, and functioning, although I still have some tweaking to do, it is assigning user and
2006 Jun 12
3
Syntax errors on "insert into"
I''m digging around and googling but can''t seem to find what I think is a simple thing. All I''m trying to do is insert data in a migration into a table, using regular SQL statements. LIke this: class AddStateData < ActiveRecord::Migration def self.up INSERT INTO states values ('''',''Alaska''); INSERT INTO states values
2006 Jun 02
3
Use a Model or Controller?
I am putting up a tool that connects to a subversion repository and checks latest revision and downloads the changeset log for all the changes made since last check and puts inside a hash for various uses inside the code. I am just wondering if the code that checks the subversion repo and reads it''s data should bolong to a controller of it''s own or a model of it''s own.
2006 Jun 13
5
Can RoR handle a lot of traffic?
And compared to PHP? -- Posted via http://www.ruby-forum.com/.
2001 Nov 22
3
Compiling winelib on SPARC
Does the latest winelib compile and work on the Sparc? Are there any special patches/instructions for this? Are there any mirrors that have the precompiled binary winelib for Sparc? Thanks in advance.
2006 Aug 01
0
Validation of facade columns
I''m having difficulty understanding how to make validation of facade columns consistent with validation of other active record columns. To illustrate this, I''m going to extend the facade column example discussed on pp. 284-5 of AWDR. Let''s say that there is a "rectangles" table that has width and height columns. For some unknown reason, width is stored in
2008 Jul 14
1
question about method "hidden_div_if" in AWDR 2
I followed the sample code in AWDR 2 like this: store_helper.rb def hidden_div_if(conditions, attributes = {}) if conditions attributes["style"] = "display:none" else attr = tag_options(attributes.stringify_keys) "<div #{attr}>" end end store.html.erb <%= hidden_div_if(@cart.items.empty?, :id => "cart") %> <%=
2009 May 01
6
Trying to install WINE getting an error message
hello helpers, When I follow the instruction to install wine on intrepid ibex (ubuntu 8.10) from this web page: http://www.winehq.org/download/deb when I reload, after key authentication I get this error message: W: GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 71346C8340130828 W: GPG
2006 Apr 09
8
Computer Name
How to get the name of the computer accessing the application? I mean the computer the user use to access the application. Thanks, Lantis. -- Posted via http://www.ruby-forum.com/.
2006 May 11
5
Recommendations for Apache 2 with mod_fcgid
Hi, Have been pulling out my hair for the last few days wondering what I''m going to deploy my site onto. I currently have FreeBSD 4.7, Apache 1.3.3, PHP 4 and MySQL 4 running a year-old PHP site. Dated stuff I know! The new version of the site will be entirely Ruby on Rails, and I am wondering what order I should be doing things in terms of upgrades and installation. I want to be
2004 Mar 19
1
Samba and Active Directory Permissions RESOLUTION
All, Thanks for the responses. There were two things I had to do to get this to work. The first thing was I had to change the readonly attribute in the smb.conf to NO. I also noticed that there was an error in my /etc/fstab so that the options were not read in for some reason. Once I fixed this and re-mounted the filesystem with the ACL option, I was able to do what I needed to do. Thanks
2006 May 21
2
Nooby partials / component problems
I''m stumped on what seems like should be a fairly easy thing, so I hope someone can point out my error. I wanted to show a few things on every page, so I added an application level template in "layouts". I added my styles in there, and put the controller name and action name into the TITLE tag for my own reference. So far so good - works like expected. Then I wanted to
2006 Jun 07
4
WEBrick wouldnt start....
hi guys, just did a search and cant find anything helpful.. suddenly my WEBrick cant start.... omg.... dunno wat''s wrong with it that''s wat i typed : ......$ruby script/server => Booting WEBrick... ......$ that''s all... i dont even know wat''s wrong and when i did a ps -F -C ruby, i also couldnt find anything..... did i jsut corrupt the file or wat???
2006 Apr 23
4
Penalties of using an eval on every request
Hello RoR! I''m building a rails app for hosting multi-page surveys. I set up questionnaire, question, and question_component models. Now I''m initializing them with some data. survey.rb q1 = Question.new "q1" q1.quote "Welcome to a test of the new interviewing system." q2 = Question.new "q2" q2.quote "Do you like pie?"