On Sat, Jan 31, 2009 at 6:18 AM, James Byrne wrote:
> Pat Maddox wrote:
>
>> I realize you didn't ask for all of that but I'm feeling a bit chatty.
>>
>> Pat
>
> The more information the better. I never really did understand exactly
> what using eval() was supposed to accomplish, now I do. Chat a
Pat Maddox wrote:
> I realize you didn't ask for all of that but I'm feeling a bit chatty.
>
> Pat
The more information the better. I never really did understand exactly
what using eval() was supposed to accomplish, now I do. Chat away...
I do want to point out that this is what the ActiveRec
On Fri, Jan 30, 2009 at 3:56 PM, James Byrne wrote:
> Zach Dennis wrote:
>
>>
>> m = MyModel.new :name => "foo"
>> m["name"] # => "foo"
>>
>> http://www.railsbrain.com/api/rails-2.2.2/doc/index.html?a=M001972&name=[]
>>
>> On a different note, how about some better variable names?
>
> That co
Zach Dennis wrote:
>
> m = MyModel.new :name => "foo"
> m["name"] # => "foo"
>
> http://www.railsbrain.com/api/rails-2.2.2/doc/index.html?a=M001972&name=[]
>
> On a different note, how about some better variable names?
That code was for demonstration purposes for this question only.
--
P
James Byrne wrote:
> This is a request for a programming technique:
Got it...
t1.read_attribute(column)
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Fri, Jan 30, 2009 at 3:45 PM, James Byrne wrote:
> This is a request for a programming technique:
>
> Given
>
> class Mymodel < ActiveRecord::Base
> end
>
> my_instance = Mymodel.new
>
> If I am given a string representation of an attribute "xxx" what is the
> most elegant way of passing that s
This is a request for a programming technique:
Given
class Mymodel < ActiveRecord::Base
end
my_instance = Mymodel.new
If I am given a string representation of an attribute "xxx" what is the
most elegant way of passing that string to my_instance to retrieve its
value? This is probably a common