Displaying 20 results from an estimated 11000 matches similar to: "cache issue with attr_accessor field"
2006 May 09
1
Session mgmt. bug - ActiveRecord & MemoryStore session store
Windows XP Pro
Rails 1.1.2
I need some help verifying this behavior that I''m seeing.
BUG: Objects in session which are descendants of ActiveRecord::Base lose
attributes on subsequent requests when using CGI::Session::MemoryStore.
TO REPRODUCE:
0) Set up MemoryStore as the session database manager in the appropriate
environment.rb file in config
1) Create a model object X that
2007 Mar 21
2
A real puzzler: attr_accessor / create incompatibility?
Greetings,
I have a problem with attr_accessor and create seemingly being at odds
with each other in my environment. Here is the setup:
A simple class representing a US State (say, Maine for example):
class State < ActiveRecord::Base
attr_accessor(:name, :code)
end
In an IRB session, I type the following and receive the response
included below:
>>
2011 Mar 07
3
difference between attr_accessor and attr_accessible?
Hi,
What''s the difference between attr_accessor and attr_accessible?
Is attr_accessor to create a virtual variable/object and attr_accessible
makes it accessible? Do you need attr_accessible if you already have
attr_accessor?
Thanks!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Jul 27
5
Calculate methods on attr_accessor objects
Is it possible to use the calculate methods (sum, etc.) on attr_accessor
attributes?
Ie:
Class Item < ActiveRecord::Base
attr_accessor :total_cost
def total_cost
@total_cost = self.cost_unit * self.amount
end
calling Item.sum(:total_cost) or Item.sum(''total_cost'') both return a
unknown column ''total_cost'' mysql error.
I thought that active
2010 Apr 22
7
Making ActiveSupport::Cache consistent
Lighthouse ticket: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4452
I have recently been working on some gems that utilize
ActiveSupport::Cache and ran into some issues with the different
implementations handling the same functionality differently. One of
the issues was that I couldn''t rely on expiring entries with
the :expires_in option. MemCacheStore takes this
2005 Oct 14
1
Diff between attr_accessible and attr_accessor
I''m going though the paper back edition of agile development with Rails. On
page #128 I encountered following lines of code:
attr_accessor :password
attr_accessible :name,:password
What''s the difference between attr_accessor and attr_accessible?
-=- Neeraj
_______________________________________________
Rails mailing list
2009 Nov 27
2
attr_accessible & attr_accessor - what's the difference?
i''m still new to rails and working on digesting everything i come
across. recently i came across these two. what is the difference
between attr_accessor and attr_accessible?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Jun 05
7
":database_manager =>CGI::Session::MemoryStore" doesn''t work properly...???
Hi,
We are try to use the "database_manager
=>CGI::Session::MemoryStore" for the session
management. our website has a lot of "redirect_to".
while the website is running under webrick, everything
is fine. But when we run the system under
aprache/fcgi. the redirect_to seems doesn''t work
anymore with the option "MemoryStore"
does anyone have the same
2007 Dec 04
10
Unexpected message on :attr_accessor
This may be a dumb noob issue, but I haven''t found any answers while seaching
the forum--
I have a controller method
def edit
@user = User.find params[:id]
@user.password_confirmation = @user.password
end
The User class has an "attr_accessor :password_confirmation" definition (so
"password_confirmation" doesn''t exist in the users table). My spec
2009 May 25
1
Help --- My phone number field saves blank
I have a phone field in my table.
But in my form i have two text boxes to get the phone number and the
country code like below
Enter country code ----- Enter phone code ------
In my table i have to save the phone code field after joining the above
values with "-" symbol.
Example => 0225-25874255
I dont have table field for country_code .
So i created like below
attr_accessor
2009 Sep 09
4
undefined method `attr_accessor' for #<CustomersControl
pleas help
--
Posted via http://www.ruby-forum.com/.
2007 Jan 24
2
attr_accessor vs attr_accessible
Please guide me how to use those two methods. I can''t differentiate
them. I was doing something on my model and I have put one field in the
attr_accessible method. After that when I try to run the app the app
always says my other fields are blank, but they''re all filled up.
What''s wrong with it?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received
2006 Feb 05
3
attr_accessor help understanding
i''m having trouble understanding the attr_accessor and attr_accessible
syntax in models. I''m workink through the Agile book and even a look at
the ruby doc does not really help to clarify.
Thanks aftershock
--
Posted via http://www.ruby-forum.com/.
2006 Jan 06
2
Re: Some advice on DB modeling
I have more or less the same problem. I''m trying to build a system where
users can enter their friends. But the solutions seems not to work for me.
I used same sql:
CREATE TABLE `friends` (
`user_id` int(11) NOT NULL default ''0'',
`friend_id` int(11) NOT NULL default ''0'',
KEY `user_id` (`user_id`),
KEY `friend_id` (`friend_id`),
2008 Jul 06
1
ActionView::Base.field_error_proc not getting an error field
In my User form I have standard field to get user record attributes
(first_name, last_name and email)
I also have a select drop_down to choose a role from an array
first_name, last_name and email are user record attributes, but I
defined the role name as a virtual attribute
validates_presence_of :email, :last_name
attr_accessor :role_name
validates_presence_of :role_name, :if
=>
2006 Feb 24
2
Problem Referencing Fixture Objects
In my tests, I use fixtures, eg pupils.yml might be:
jimmy:
id: 100003
known_as: Jimmy
surname: Page
academic_year_id: 1
gender: m
In the test, @jimmy (the referencing style referred to in Agile Web Dev....)
is nil, whereas pupil(:jimmy) returns the expected Pupil object.
What gives?
Robert
2015 Jun 15
1
you have been logged on with a temporary profile_win7 client+samba 4+WinServ2012
Hello
_Rowland_: I can confirm that the profile path in the "user profile" tab
is set to \\jimmy\disk1\profs
Please have a look at my "Advanced security settings" for profs (\\jimmy)
http://imgur.com/4dAP6zt
http://imgur.com/XGJwFpx
http://imgur.com/HIR4ZJq
In my first email I said that the user was able to view, edit. delete
files from \\jimmy\disk1\profs. I have tested
2015 Jun 12
1
you have been logged on with a temporary profile_win7 client+samba 4+WinServ2012
No they have no profilePath attribute sets up, they have however a
base directory set up by default as you can see on the link below.
https://app.box.com/s/32jbi0dwac23uypqvm6i0v8suqtbfijd
Meilleures salutations / Best regards,
Joseph-Andr? GUARAGNA
2015-06-12 10:40 GMT+02:00 Rowland Penny <rowlandpenny at googlemail.com>:
> On 11/06/15 16:29, Yanni wrote:
>>
>>
2020 May 15
2
RFC] Shrink-wrapping improvement
Hi Francis,
Thanks for getting back to me. Could you please provide more details about the problems you encounter with those tools and what improvements required to improve compact unwinding format? Most of my experience is in the mid end, but it is still surprising to me that an improved shrink wrap will break that many tools, considering the fact that gcc has a good shrink wrapping pass and
2020 Apr 17
2
Scalar Evolution Expressions Involving Sibling Loops
Thanks for sharing the known problem.
I think to solve the problem properly, we need to fully understand why that
assumption about dominance is there and the implications of removing it.
It would be good if you could be more specific about your idea of nullptr
or SCEV_unknown (eg which function would return those values and when), but
returning nullptr from getAddExpr or getSCEVAtScope may be