similar to: model with not te be updated attributes ?

Displaying 20 results from an estimated 1000 matches similar to: "model with not te be updated attributes ?"

2006 Jan 25
14
Salted Hash Login Generator
Does this work with rails 1.0 ? I saw that people said it failed with rails 14.1, which practically identical. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060125/5da24694/attachment.html
2007 Jan 23
11
dynamic tablenames
Hi List! May I tap into your combined common sense ? I have a legacy logging app that needs to be modernized. At the moment, Data is going to be stored in 5 tables, one table is going to contain more than 200 million and 2 others about 60 million rows. Mysql will be used, unless someone sees a major advantage in using something else (at the moment data is stored in a raw positioned file format,
2006 Jun 30
3
@foo = Bar.new(params[:foo])
While doing @foo = Bar.new(params[:foo]) in a controller, the application is open to injection attacks. For example, My model has following attributes : name password admin - boolean Now, if on my form I''m just acception name & password, and doing @foo = Bar.new(params[:foo]) in my controller, someone can just enter following in form : <%= text_field ''foo'',
2006 Jun 07
4
Question: coding protected methods
Apologies first, because I need to ramp up on Ruby and coding Ruby in Rails, however it''s my 3rd day with this beast :) so I''m asking : When I added protected methods to the model before it was like: protected method.................... end Would this be a valid way to write a protected method as well ?: attr_protected :column1, :column2 Perhaps this particular call
2006 Jun 05
2
When adding a record in console, a parameter comes in as null even when I set it
In console, I am trying to create a User but the :account_id does not come in. Console just gives me back :account_id => nil. Obviously I''m trying to set it though. Silly console... But, I can set the account_id column in my controller like so: @user = User.new(params[:user]) @user.account_id = account.id @user.save Here''s what I give to the controller: User.create :name
2010 Nov 02
7
Testing attr_accessible (and/or attr_protected)
I''ve been puzzling over how to test that attr_accessible has been set for the correct columns; but the tests I''ve come up with so far seem to fail to fail when I expect. I came across this old message from this list: http://www.mail-archive.com/rspec-users at rubyforge.org/msg01570.html Which seemed like a plausible example, but my attempt (modeled on the example)
2006 Jun 08
5
update only the join table in a HABTM - how?
I have a photographers app that requires giving access to galleries for users. in one part, I want to be able to define gallery access for a user seperate from updating any of the user info. I have this function: def edit_access @user = User.find(params[:id]) @user.galleries = Gallery.find(params[:gallery_ids]) if params[:gallery_ids] if @user.update_attributes(params[:user])
2007 May 21
7
How do I stop a column being updated by model.save?
One of my models has a column that is updated very frequently from a separate process, so it is important that when a record is saved in rails, this column should be left alone. In the update method of the controller I have: @record = MyModel.find(params[:id]) @record.update_attributes(params[:my_model]) params[:my_model] doesn''t have a reference to the column I''m talking
2009 Jun 09
3
protect_from_forgery doesnt protect from forgery
Maybe I am grasping the full usage of this protect_from_forgery function, but it does not seem to work for me. Imagine the following: A simple website with a user that needs to log in to do certain stuff and a closed off admin section that only certain users can access that have the is_admin field set to true. So to be clear, my User model has a login, password and is_admin. When displaying the
2006 May 17
40
IDE recommendations?
I was wondering if there are any IDEs out there that has autocomplete features for win32. It would be perfect if it could do something akin to what DHH is doing on the screencast hosted on the rails website. http://media.rubyonrails.org/video/rails_take2_with_sound.mov Cheers -- Posted via http://www.ruby-forum.com/.
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
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.
2005 Dec 23
6
Selecting time
I''m currently building a small app that''s going to be used to keep track of the amount of time spend on customers of the company I work for. This mainly consists of object with a begin time, an end time and a calculation of the difference between those timestamps (actual time spend on the job). I made a small form with a datetime_select helper for the begin and end time (the
2007 Oct 16
12
Example for attr_accessible?
Is anyone out there writing specs to check attr_accessible fields? I had originally written my spec to check for allowing the desired fields, and then none of the other regular db fields. Unfortunately this isn''t satisfactory, because attr_protected could have been used instead, which of course wouldn''t prevent mass assignment to any whatever=(val) method. I''m thinking
2007 Jan 26
7
How to protect attributes from being updated?
Hi! I''m new to Rails! Rails rox! 1 quesion so far: I have :email attribute in User model. I dont'' want :email to allow to be updated. How do i do this with Rails? Do I have to implement required validation manually? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2018 Feb 18
2
migrate several samba3+openldap pdc to samba3
On Sun, 18 Feb 2018 14:05:38 +1300, Andrew Bartlett via samba wrote: > On Sat, 2018-02-17 at 20:44 -0300, Guido Lorenzutti via samba wrote: > >> Hi there! I have one domain, shared between several samba3+openldap on different geographical locations. I want to migrate them to samba4. The domain has aprox 4000 users accounts, 4000 workstations, and several groups. I was able to
2004 Feb 11
7
large fonts on plots
Hi all, I need to enlarge te fonts used oo R-plots (plots, histograms, ...) in labels and titles etc. I seem to be unable to figure out how to do it. The problem is that the titles of the plots are simply unreadable when I insert them into my LaTeX text, since they are relatively small compared to the entire plot. I am sure it is pretty simple, can anybody give me a hint ? Please reply
2018 Sep 14
7
Extending the AD schema - Cannot see attributes in RSAT
Hy Guys, I am trying to migrate to samba 4 and I need some help. So, I have a samba running with samba 3 and LDAP. Today I use my samba for auth of my e-mail, file server and several other applications. I use a WEB based LDAP administration program called goSA. I have Installed samba 4.8.4 on a test machine and create some users, the problem is, to keep my email and all functionality that I
2006 Jul 17
19
updating model
hello, i am writing a simple user login system. when registering a user account, i have two field: password password_confirmation which are validated using validates_presence_of validates_confirmation_of and these are then used to generate a password hash which is stored in my database when i want to update the record (without changing the password and entering new values for password and
2006 Feb 06
3
for-loop with multiple variables changing
Hi all, Never really managed to build a for-loop with multiple running variables in an elegant way. Can anybody hint ? See below for an example of what I would like. EXAMPLE a<-c(1,2,3) b<-c("name1","name2","name3") for( number in a, name in b ) { print( number ) ##take a value print( name ) ##and have its name available from a second list } Does R