similar to: how to do security??

Displaying 20 results from an estimated 400 matches similar to: "how to do security??"

2005 Dec 15
3
How to delete a record
hey, i my database i have users and groups, each user can get in different groups my db structure: table groups: id, name, basegroup, firm_id table users: id, firstname, lastname, email table groups_users: group_id, user_id my relation is a many to many: class Group < ActiveRecord::Base has_and_belongs_to_many :users end class User < ActiveRecord::Base has_and_belongs_to_many
2005 Dec 21
1
how to sort records??
hey, ยต i have these records in my database, in a many-to-many relationship clients_users 1;66 2;66 3;66 5;66 6;66 7;66 8;66 14;66 15;66 16;66 17;66 18;66 19;66 20;66 21;66 22;66 clients 1;VME Complex Foster 2;VME Res. Canada 3;Twodecode 5;Index 6;Verleye bvba 7;Venus bvba 8;All Building Services nv 14;Vitro-Service sa 15;Vitro-Clean 16;Vecom nv 17;Ultra lean bvba 18;Solar Cleaning Services nv
2005 Dec 23
1
pagination problem
hey, i have this problem in the database i have 32 records and the sql filtered 4 records #getting the callerid records depending on the given paramaters and paginate it @callerid_pages = Paginator.new self, CallerId.count, 10, @params[''page''] @caller_ids = CallerId.find(:all, :conditions =>["geotags.firm_id = ? ", @firm_id], :order => " geotags.address1
2005 Dec 22
0
conditions on model
hey, this is the situation, an user may only access x clients (ex , 1, 5 ,6 ,7), so i make a string with those ids and paste it to the sql statement, the user is from the session #creating a list of all the client record ids the user may access and paste it in the sql statement if user.has_permission(''admin'') || user.view_all == 1 text = "" else text =
2005 Dec 21
2
what is print_r in rails
hey, i know u have in php print_r or echo, so that the browser print the variable on top of page, no matter what what is this in rails?? put doesnt seem to work Thanks Nick
2006 Jan 23
1
Help with hmabt relationships
hey, I want to have this table structure with users and groups A user can be in more than 1 group and a group has more than 1 user. class User < ActiveRecord::Base has_many_and_belongs_to :groups end class Group < ActiveRecord::Base has_many_and_belongs_to :users end I was wondering if i can do this for group in user.groups ...do stuff end -AND- for user in group.users ...do stuff end
2005 Dec 29
3
Post problem with select lists
hey, i have this problem how come i always get -1 for the select list?? rhtml First, select a client. <select id="client_id" name="client[id]" onChange="submit();" > <%= options_for_select(@client_options, @client_id.to_i) %> </select><%= @client_id %> controller if @request.post? if @request.xml_http_request? #called by ajax,
2012 Mar 24
3
How to compute within-group mean and sd?
Hi, I want to run something like SELECT firm_id, count(*), mean(value), sd(value) FROM table GROUP BY firm_id; But I have to write a for loop like for ( id in unique(table$firm_id ) { print(paste( id, mean(table[firm_id == id, "value"]) )) } Is there any way to do it easier? Thanks :) Best, Reeyarn Lee [[alternative HTML version deleted]]
2009 Apr 05
2
Prohibit removing INBOX
Hello list, I'm using dovecot 1.1.11 and I'm going to prohibit users to remove their INBOX and some other directories in the mailbox root. I used Access Control Lists (http://wiki.dovecot.org/ACL) to do this: protocol imap { mail_plugins = acl } plugin { # With global ACLs in /etc/dovecot/acls/ directory: acl = vfile:/etc/dovecot/acls } /etc/dovecot/acls/.DEFAULT: owner
2015 Sep 08
3
Multiple vacation
Hi all I'm using Dovecot 2.2.9 and I'm having problems configuring multiple vacation actions. The problem is that I'd like to have two different senders and two different messages, selecting the correct case by the recipient email address. I mean, if someone writes me to my email address "to-address1 at example.com" I'd like to answer from "from-address1 at
2006 Mar 26
2
Shared Columns in an STI
I have a an STI table which acts_as_tree, that has a large number of classes/types. My common fields are: id parent_id name description with 4 more text fields, I could cover most of my classes if I could redefine the name of the field like this. text1 AS address1 text2 AS address2 text3 AS zipcode For one class and text 1 AS model_number text2 AS vendor Is there a construct that will allow
2005 Dec 19
1
re-selecting a select list on create
I have a select list tht is built from a "collection_select" and I want to reselect the value the user submitted if any part of the form errors. could someone point me in the right direction for doing this? my select looks like this collection_select(:company, :id, @companies, :id, :name) I tried setting the variable @company to param[:company] but that didnt work. thanks --
2006 Jul 14
2
RESTful thinking - Need some guidance.
This is my first time working with REST and XML. My goal is to access Google''s geocoding service using HTTP. Here''s the code I have so far: require ''open-uri'' require ''rexml/document'' include REXML url=''http://maps.google.com/maps/geo?'' address = ''q=1600 Amphitheatre Parkway Mountin View,CA'' address1 =
2008 May 07
1
Assigning to the foreign key on a belongs_to association
I''ve encountered what seems like an odd omission in the behaviour of belongs_to associations: if you assign to the foreign key attribute, it doesn''t update the associated object (or mark a previously loaded one as stale) until you explicitly save or reload it. Let''s say we have a Company model, which belongs_to :city : >> torchbox =
2006 Jan 05
7
Multilanguage problem, need help
hey, i use http://mir.aculo.us/articles/2005/10/03/ruby-on-rails-i18n-revisited then i have nl_BE.rb, de_DE.rb, en_US.rb as translation files. this works all fine when i have normal characters, but i have one problem when i have wierd characters like ? ? ? (mostly in french), then i get japanese charachters on my site i use utf8 for my database and i set this for each def in my controllers,
2006 Oct 13
3
Validation errors in has_one/belongs_to relationships.
I have two objects, QuoteInput and Insured. QuoteInput has one Insured and Insured belongs to QuoteInput. I don''t understand what I''m seeing. I assign an Insured to a QuoteInput. The Insured object has invalid data. I call save! on the quote input. QuoteInput has no validations. I expect two things to happen - 1) an exception should be thrown, indicating that there was a
2006 Jun 01
3
more questions: human_name
One more question: Is there some way to set the human_name of a column? e.g.: human_name for column address1 shouldn''t be Address1 but "Address, line 1". If not, should I make a hash with my custom names? Best regards, -- ---------------------------------------------------------------------- Yannick Majoros http://www.inma.ucl.ac.be/~majoros Informaticien UCL/INMA-MEMA
2005 Dec 01
0
problem with options_from_collection_for_select() need id not name
hey, i need a select list with a id property and not name, cuz i just ajax with this list and it checks on id not name if @request.post? #called by ajax if @request.xml_http_request? #called by ajax @geotag_id=params[:geotag_id].nil? ? -2 : params[:geotag_id] else @geotag_id=params[:geotag][:id].blank? ? -1:params[:geotag][:id] end else @geotag_id = -1 end i use this @geotags =
2008 Mar 19
2
Stub / Mock - A little guidance?
Hi there, I''m still trying to wrap my head around when to use a stub and a mock. If I understand this right, I should be using a ''mock'' when imitating an object, but not its behavior. I should be using a stub when I want to imitate the behavior of an object. Does that sound about right? With that said, I''m struggling a little trying to spec out this instance
2005 Oct 12
4
Validating 2 related models at once not working
Hello, I have a form that submits data to two related models/tables. One is Customer the other is Address. Validation for Customer works fine but not for the Address. Class Customer < ActiveRecord::Base has_one :address validates_presence_of :login, :password, :email validates_associated :address end Class Address < ActiveRecord::Base belongs_to :customer validates_presence_of