similar to: Different validation for different users

Displaying 20 results from an estimated 2000 matches similar to: "Different validation for different users"

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 Apr 08
2
Multiple submit buttons
Hi, How do i differentiate different submits tags / buttons on one form. Say I want to create an edit form and I want to provide two buttons; one to save and one to cancel. I would have: <%= submit_tag ''Ok'' %> <%= submit_tag ''Cancel'' %> How do I know which button get pressed by the user? One more thing, how to specify the default selection in a
2006 May 23
1
Detecting internet connection
Hi, Is it possible to detect whether the internet connection is on from the application? Thanks, Lantis. -- Posted via http://www.ruby-forum.com/.
2006 May 23
6
Accessing file in public directory
How do i access a file in the public directory of rails application? I have several html files in there and i want to link them from the rhtml file. Basically to display a popup. Here is the code in foo.rhtml: <a href="javascript:popUp(''/summary.html'')" class="normal">Learn more</a> It doesn''t work. Any idea why? Thanks, Lantis. --
2006 Jan 16
16
acts_as_authenticated current_user in a model?
What do I need to do to be able to use an acts_as_authenticated current_user in a model? Is there some sort of include or require I can do some where that would allow this? ********************************************************** Here is what I am trying to do: ********************************************************** class Setting < ActiveRecord::Base before_create :created_by_user #
2006 Mar 26
5
How to write manage created_on and created_by via mixin?
Hi! Definite newbie here - I''m working through this like-hate relationship with Ruby and Rails right now... sometimes things work really well (like blobs seem to rock) but other times, I dunno! :-) Anyway, I''d like put in create and update user timestamps on all my primary domain tables and allow them to be updated automatically by ActiveRecord. Coming from Hibernate, I just
2006 Mar 31
2
W3C Standard
I''m rather new to web programming. I''m wondering, does rhtml file conform to W3C standard? Or is there a way to make it conform to W3C standard? Thanks, Lantis. -- Posted via http://www.ruby-forum.com/.
2006 Apr 16
5
ActionMailer
Is there a way to connect to a SMTP server that requires TLS since ActionMailer doesn''t support it? Thanks, Lantis. -- Posted via http://www.ruby-forum.com/.
2006 Mar 24
2
Access to session data
Greetings, This, I hope, is a simply answered question. Based on Agile Web Development with Rails (depot application), I''m developing a single table application for contact info. There is only an admin side to this, so there''s always authentication. Part of the info record (member) is changed_by and changed_at which I automatically want updated. Changed_at looks after
2006 Apr 17
5
Finding out updated fields
Hi, When we update a record via an update form, is there an easy way to find out the fields that have been changed. If the update is successful, i want to display: The following fields have been changed: field-name = new-value ... Thanks, Lantis. -- Posted via http://www.ruby-forum.com/.
2007 Jan 21
35
Collection proxies need to be stubbed ?
Hi all ! I just started writing specs on a new project. I would just like to validate that this is the way you would write it. I know about mocks, stubs and expectations. I don''t think this is a problem for me. My question really boils down to: def index @projects = current_user.projects.active end My spec needs to return the proxy, no ? Here''s my code: context "A
2006 Jul 27
2
Creating multiple objects from form data
I''m in the process of creating a sign up form for an online application. The form collects account info, company info, and then info for an administrative user. The method looks like this: def create @account = Account.create!(params[:account]) @company = @account.companies.create!(params[:company]) @user = @company.users.create!(params[:user]) end However, this inevitably fails
2006 Feb 20
3
file_column and login_engine incompatibilities
Hi, has anyone come across any incompatibilities between file_column and login_engine? I''ve been having strange issues where a User model with file_column in it is failing to save the images properly. Everything uploads to the tmp dir fine, but then it never gets copied to the proper permanent location. No errors - everything happens fine except for that final part. I have
2005 Aug 15
5
Customized Autocompletion
In the customized autocomplete demo, how does it know what content to use as the value of the autocomplete? The returned UL has the name, email address and an image. Yet only the name is used. How does it do this? I''ve been trying to get something similar going all morning with little success. Also, what does :skip_style=>true do? I couldn''t seem to find a mention of it
2006 Jun 21
14
[Bounty] 1 pizza for 1 simple plugin
So here''s the deal. I don''t know the innards of rails well enough to do this quickly but you might. First person to write this and release it under MIT license or public domain, and tells me, gets a free pizza from your favorite local delivery place. You pick the toppings, I''ll call ''em and order it up for you. Yeah a pizza isn''t much but I''m
2006 Apr 05
4
How to do IN(?) query?
I''m trying to do an IN query, where I have an array of user objects imaginatively named ''users'': :conditions=>["user_id IN (?)", users.collect{|u| u.id }.join('','')] this ends up with: ... IN(''1,2,3'') ... Obviously I want this to be: ... IN(1,2,3) ... or even ... IN(''1'', ''2'',
2006 Apr 12
8
500 Server Error - stumping me at the moment
I''m trying to deploy an app on Dreamhost and I''m getting the infamous 500 Server Error. Nothing in the rails logs because it looks to be happening before it gets there. In the apache error logs we have: [Wed Apr 12 12:51:51 2006] [error] [client 194.80.32.9] FastCGI: comm with (dynamic) server "/home/rlivsey/thatsprogress.com/current/public/dispatch.fcgi"
2006 Jun 13
9
act_as_versioned and join tables?
Greetings! I''m attempting to use the act_as_versioned plugin to provide versioning functionality for my rails app, but can''t think my way through this: How can you use act_as_versioned to perform versioning on a HABTM join table? It is easy to see how to do so for join models (:has_many :through) but not so for the join table. I want to use act_as_versioned to maintain
2006 Jan 05
5
File_column crashing WEBrick when using :magick options
I''m trying to use file_column in an app I''m writing. Simple file uploads are working fine. However, when I try and use the :magick options to make resized versions, WEBrick dies. This is the Media model: class Media < ActiveRecord::Base file_column :media_item, :magick => { :versions => { :thumb => {:size =>
2006 Mar 30
11
Illegal char \002? Need to restart Rails to see changes?
Hi all, I''m developing an app on a home Windows computer and using SVN/Capistrano to deploy to a Linux server. I''m encountering some bizarre behavior that I think has something to do with Linux and Windows text file types, but I''m not sure. What''s happening is that, whenever I edit my view files and reload the page in my local browser, I see errors saying