similar to: Is the primary key of a model already attr_protected?

Displaying 20 results from an estimated 40000 matches similar to: "Is the primary key of a model already attr_protected?"

2012 Jul 09
10
attr_accessible on some properties + attr_protected on others makes class 'open-by-default'
(I posted this as a bug in GitHub (https://github.com/rails/rails/issues/7018), but then someone there told me I should post it here, so here it is.) If you set attr_accessible on some properties in an ActiveRecord-descended class, and then attr_protected on others - the class becomes ''default-open'' - if any properties are missed or added later, they will be accessible by
2005 Mar 04
3
Boolean values
Hi, I''m using SQL Server. I have a BIT field. I have a fix and a question. This is a patch for a bug in the SQL Server adapter that causes any insert or update to fail: lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -239,2 +239,2 @@ - when TrueClass then (column && column.type == :boolean ? "''t''" : "1")
2006 Feb 28
0
Question abour Draggables & Droppables - my code example
hi i think my example is very simple and straightforward so i''m not sure if it meets your needs (change revert:true to revert:false from a draggable after I drop it on a droppable so it doesn''t return to its original place.) i did this # 2 divs created here <script language="javascript"> new Draggable(''drag'', {revert: false});
2007 May 30
9
Specify attr_protected
This is kind of a two part question. Question One: I want to be sure that an Order model is protecting sensitive attributes from mass assignment. The example looks like this: describe Order do it "should protect total attribute from mass assignment" do @order = Order.new(:total => 0.05) @order.total.should_not == 0.05 end end And the code to implement it: class Order
2006 Apr 18
2
RE: how to evaluate responseText as an array?
getSelectedGridData()[getSelectedRow()] = eval(response.responseText); I believe that will work. Greg ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson Sent: Tuesday, April 18, 2006 12:56 PM To:
2005 Dec 27
0
Edge Rails idea -- was [DRY relative to edit and show]
Just got around to understanding your idea Rich. Your idea seems to apply to every controller with new/edit/show views, so I think this is a better idea for the edge rails folks to implement generically than for a newbie like me do as a one-off. Thanks Greg On 12/23/05, Rich Clingman <Rich-xT5DcnBKZlNBDgjK7y7TUQ@public.gmane.org> wrote: > > > It would be nice if rails had a
2005 Aug 08
0
RE: Rails is a Hammer? (was Rails is Mainstream ?)
No. Garage full of wood and tools collecting dust. Isn''t that the definition of "hobby" ? Peter J. Fitzgibbons Applications Manager Lakewood Homes - "The American Dream Builder"(r) Peter.Fitzgibbons-STCS76aLmhk1y/cD6r8xzl6hYfS7NtTn@public.gmane.org (847) 884-8800 -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
2006 Apr 17
2
RE: document.getElementsByClassName (prototype) andElement.childrenWithClassName (scriptaculous) redundancy?
Isn''t the difference that the scriptaculous one only gets child nodes from the node you specify, whereas the prototype one gets all in the entire document? Still, it would be nice to just have the one, and let you pass in the document element if you wanted all of them. Just guessing, really. I haven''t looked at the code in question. Greg > -----Original Message----- >
2006 May 18
1
RE: Rails-spinoffs Digest, Vol 12, Issue 29
Issue 1: <%= @pic %> instead of <% @pic %> -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of rails-spinoffs-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Sent: Wednesday, May 17, 2006 11:13 PM To:
2006 Feb 27
0
RE: FW: Calendar widget
Perfect, thanks Marco, great help! Now, why didn''t I think of that? Lol! -----Original Message----- From: Marco M. Jaeger [mailto:mail-yVS5avHIROZWk0Htik3J/w@public.gmane.org] Sent: Monday, February 27, 2006 2:02 PM To: ''www.dhtmlgoodies.com'' Subject: RE: FW: [Rails-spinoffs] Calendar widget Thank you Alf - I appreciate your fast response Marco M. Jaeger | Url:
2005 Oct 18
0
RE: Error: "onclick() is not a function"
I see what he is saying now. When you assign a click event with the Event.observe it does not allow you to call it with the $(''xxx'').onclick(); command as it''s looking for the onclick tag in the a tag. I''m stumped on a way to get this to work. Jon Whitcraft Web Application Developer Online Services - Indianapolis Motor Speedway (317) 492-8623
2005 Dec 14
3
why would an int column in a join table be a String class in model?
i''ve got an issue with integer columns in the database becoming strings in the model and I''m not sure why this is happening. perhaps someone can explain. given the following setup (simplified for example) tables: users ---------- id - int name - varchar(60) roles ---------- id - int name - varchar(60) roles_users (join table) ---------- role_id - int user_id - int
2005 Mar 01
2
@request cycle variables
I posted something about this yesterday, and got some good responses but it seems that the variable @request[''controller''] isn''t being passed in to the page or isn''t being read. Has the naming convention for these variables changed. it worked great in all rails versions up to 0.9.5 with fcgi, but is not working in rails 0.10.0 with fcgi. I am currently just
2006 May 19
1
RE: Re: Content Rotate, unwanted flashing on Firefox
Never mind........it looks fine for me in Windows 2000 FireFox 1.5.0.3 -Andrew Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martinez, Andrew Sent: Friday, May 19, 2006 5:01 PM To:
2005 Jun 08
0
warning: already initialized constant problem
Hi, I am getting the following error in WeBrick when using salted login generator: > ./script/../config/..//app/helpers/user_helper.rb:7: warning: already > initialized constant DEFAULT_HEAD_OPTIONS > 127.0.0.1 - - [31/May/2005:18:04:55 PDT] "HEAD /company.html HTTP/1.0" > 200 0 Now, I can easily get around this bug but i wondered how to prevent it from happening.
2005 Aug 25
1
newbie questions about hosting address
Dear Rails groups, thank you for all the previous helps in this group, and me being a newbie is getting more comfortable with rails and now I finish most of the scaffold modification without much problem. My question is(I know it''s absolutely basic questions but I''m a real outsider :~( ) I have been developing in my own pc, now my office ''s other people will test on it,
2006 Jan 08
0
RE: Replacing an html chunk with a different htmlchunk
Actually, I see there are two other prototype calls: Element.remove(''foo''); Which does a parentNode.removeChild(), and Element.update(''foo'', ''some html''); Which does element.innerHTML = ''some html'', and executes any script that is in the string you pass in. -----Original Message----- From:
2006 Mar 22
1
RE: Support for window scrolling for draganddrop
To answer my own question, yes. I looked at the trunk and it passes the option on from Sortable. Greg > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill > Sent: Wednesday, March 22, 2006 12:51 PM > To:
2006 Mar 09
0
RE: extending an existing DOM object in aprototypeway
..lol... and I screwed up the option... one more time... var myActiveSpanBase = new ActiveSpan({color: "red"}); Object.extend($(''someSpan''), myActiveSpanBase); $(''someSpan'').setup(); Or, more concisely... Object.extend($(''someSpan''), new ActiveSpan({color: "blue"}); $(''someSpan'').setup();
2006 May 30
1
Read-Only Model Attributes AFTER creation?
Howdy, I''m writing an ''edit profile'' screen. I was writing some tests first (yay!), and I realized that, if you were smart, you could use the edit form to change your username. I know I could use attr_protected on username, but that would still allow for usernames to be changed (abeit not through the form). How can I make the username read only AFTER the object has