search for: some_attribute

Displaying 13 results from an estimated 13 matches for "some_attribute".

2009 Sep 06
1
How many attributes are there of a variable?
Hi, According to the example below this email, attr(x,"names") is the same as names(x). I am wondering how many attributes there are of a given variable. How to find out what they are? Can I always use some_attribute(x) instead of attr(x, "some_attribute")? Regards, Peng > x=c(1,2,3) > attr(x,"names")=c("a","b","c") > x a b c 1 2 3 > > y=c(1,2,3) > names(y)=c("a","b","c") > y a b c 1 2 3
2008 Jan 11
1
Remote form for, Form.serialize and parameter arrays
Whenever I use regular form for and have an attribute list containing an array all goes fine and it results in parameters like: {"some_attributes"=>[{"title"=>"first_title", "text" => "text1"}, {"title"=>"second_title", "text"=>"text2"}]} However whenever I submit the same form with remote_form_for then it generates the following array: {&q...
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
2006 May 26
9
What syntax is this? belongs_to :Person
...I don''t see anything like the syntax you see people using in rails code. Specifically when you see. belongs_to :Person has_many :Phones etc these are methods on ActiveRecord right? Why is this invocation syntax never described in the Pick Axe book? I do see things like attr_reader :some_attribute etc but you don''t see it in the context of invoking a method on your ancestor. Can somebody cite me where this is described in the Pick Axe book?
2006 Apr 06
0
FormBuilder-friendly labels?
...nstantly. Is there a better way to do this than the snippet below, or do I need to do a little extension to the FormBuilder itself? <% form_for :long_example_name, @long_example_name, :url => { :action => :new } do |f| %> <%= label_tag "long_example_name[some_attribute]", "Some Attribute:" %> <%= f.text_field :some_attribute %> <%= label_tag "long_example_name[some_other_attribute]", "Some Other Attribute:" %> <%= f.text_field :some_other_attribute %> <%= label_tag "long_example_nam...
2011 Sep 04
3
rspec assert inclusion in..
hello, I would like to assert that an attribute of a model has value among those in an array. How would I do it in rspec? Something like this... describe OptionType do context "shoulda validations" do it { assert_contains :type, [''Type1'', ''Type1'']} end end
2006 Jan 10
5
IP Address
There''s got to be a simple answer: how do you get the IP address of a visitor in Ruby? Any help would be appreciated! -- Posted via http://www.ruby-forum.com/.
2013 Apr 23
0
[LLVMdev] Feedback required on proper dllexport/import implementation
Hi Nico, Reid, and Anton, I missed the discussion when I implemented dllexport/dllimport for our local tree. I essentially implemented your approach#1. I was trying to avoid the various external_linkage + some_attribute approaches because it seems that external_linkage would imply the external linkage without the dllimport/dllexport semantics, and there may be existing compiler codes that rely on this semantics. If I used external_linkage + some attribute, then any place in existing codes that uses hasExternalLInk...
2013 Mar 26
6
[LLVMdev] Feedback required on proper dllexport/import implementation
Hello, while improving and extending support for dllexport/import I have noticed that the current way these are implemented is problematic and I would like some input on how to proceed. Currently dllexport/dllimport is treated as linkage type. This conflicts with inlined functions because there is no linkage for the combination of both. On first though, combining both doesn't make sense, but
2005 Apr 23
7
Validation question
Hi all, Is there a way to invoke validations at times other than save, create and update? I know that I can do this by writing my own validation checks using errors.add_[blah], but I''d like to leverage the existing validation code. What I have is two sets of fields in a record, set A and set B. Both sets must be validated on record create. However, the trouble is that after
2013 Apr 23
2
[LLVMdev] Feedback required on proper dllexport/import implementation
On 23.04.2013 19:10, Gao, Yunzhong wrote: > I missed the discussion when I implemented dllexport/dllimport for our local tree. I > essentially implemented your approach#1. I was trying to avoid the various > external_linkage + some_attribute approaches because it seems that external_linkage > would imply the external linkage without the dllimport/dllexport semantics, and there > may be existing compiler codes that rely on this semantics. If I used external_linkage > + some attribute, then any place in existing codes that uses...
2013 Jun 22
4
ActiveRecord::Base.transaction - SystemStackError - stack level too deep:
Im having an issue that seems to only happen when trying to use a transaction. Ive used transactions many times in the past and Im at a loss as to why im getting the stack level too deep problem. SystemStackError - stack level too deep: actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:70:in `'' I have a StackOveflow with more detail -
2007 Nov 07
10
Plain Text Story example
Hey all, Does anyone have an example(s) of the plain text story runner for rails? I have read David''s blog (http://blog.davidchelimsky.net/articles/2007/10/22/plain-text-stories-on-rails) about it but I would like to see some examples with all of the step matchers included... I couldn''t find any more examples on google talking about the plain text stories and the example