search for: has_attribut

Displaying 4 results from an estimated 4 matches for "has_attribut".

Did you mean: has_attribute
2006 Feb 07
17
Easy way of dealing with nil properties in templates?
Is there an easy way to deal with nil properties in templates? All I''m aware of are these methods, and it''s quite tedious and surely violates DRY. <%= @member.name unless @member.name.nil? %> <%= @member.name.to_is %> <%= "#{@member.name}" %> csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the
2006 Apr 10
0
undefined method exception
Here''s the exception: undefined method `missing_since'' for 1140030500.21:Float And here''s the code: %= cop.lost.missing_since if cop.lost.has_attribute?(:missing_since) %> Interestingly enough, the value quoted (1140030500.21:Float) is the value of the missing_since attribute.... Also, this code: <%= cop.lost.attributes %> Results in this: missing_since1140030500.21id1copy_id1borrower_id2 Any ideas? This is really baffling......
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/.
2008 Nov 06
10
Rails 2.1.2 bug in include on has_many?
In my continued efforts to port my rails 1.x app to Rails 2.1.2, I keep running into what appear to be ActiveRecord bugs. I am using an :include on a :has_many definition: class Request < ActiveRecord::Base has_many :service_types, :order=>''service_types.id ASC'', :include=>:service_response [...] There''s no reason this wouldn''t be supported in