search for: values_at

Displaying 8 results from an estimated 8 matches for "values_at".

Did you mean: value_a
2007 Oct 17
9
@session['user'] vs session[:user]
This might seem really simple to some but just wanted to ask: what is the difference between @session[''user''] and session[:user] ? and how would you use each? And another question, I have the following code: def get_customer if @session[''customer''] @c = Customer.find(@session[''customer'']) end end private def
2015 Jun 29
1
puppet files denied by SELinux
...ependencies > Notice: /File[/var/lib/puppet/lib/facter/gemhome.rb]: Dependency > File[/var/lib/puppet/lib] has failures: true > Warning: /File[/var/lib/puppet/lib/facter/gemhome.rb]: Skipping because of > failed dependencies > Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/values_at.rb]: > Dependency File[/var/lib/puppet/lib] has failures: true > Warning: /File[/var/lib/puppet/lib/puppet/parser/functions/values_at.rb]: > Skipping because of failed dependencies > Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/getvar.rb]: > Dependency File[/var/lib/pupp...
2006 Nov 04
0
arrayfields-3.6.0
...we already have Arrays? fields = %w(ssn name position) table.each{|tuple| tuple.fields = fields} tuples[34578][''ssn''] #=> 574865032 LIST OF OVERRIDDEN METHODS: - Array#[] - Array#[]= - Array#at - Array#delete_at - Array#fill - Array#values_at - Array#indices - Array#indexes - Array#slice - Array#slice! LIST OF NEW Array METHODS: - Array#fields= - Array#each_with_field DOCS/USAGE/SAMPLE: - lib/arrayfields.rb - test/arrayfields.rb AUTHOR: ara.t.howard@noaa.gov HISTORY: 3.6.0: - made string/symbol...
2010 Dec 20
1
Writing to a CSV with Faster::CSV
Is there a way to write a csv file using a hash instead of an array? Something like this: header_keys = :first_name, :last_name, :email FasterCSV.open("path/to/file.csv", "w") do |csv| User.all.do |user| csv << user end end Thanks... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2015 Jun 21
2
puppet files denied by SELinux
Hi all, Thanks for all your suggestions. Here's where I'm at with this. Can you give details about your puppetmasterd setup ? it seems that > you're using Foreman as puppet ENC. > Yes, I'm on foreman 1.7.4 and puppet 3.75. You are correct that I'm using foreman, sorry I hadn't thought to mention it! > Foreman works fine with selinux enabled : that's what
2015 Jun 21
0
puppet files denied by SELinux
...pping because of failed dependencies Notice: /File[/var/lib/puppet/lib/facter/gemhome.rb]: Dependency File[/var/lib/puppet/lib] has failures: true Warning: /File[/var/lib/puppet/lib/facter/gemhome.rb]: Skipping because of failed dependencies Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/values_at.rb]: Dependency File[/var/lib/puppet/lib] has failures: true Warning: /File[/var/lib/puppet/lib/puppet/parser/functions/values_at.rb]: Skipping because of failed dependencies Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/getvar.rb]: Dependency File[/var/lib/puppet/lib] has failures: tru...
2012 Nov 03
0
ids writer fields for HABTM relationship.
...ents the ids writer method, e.g. foo.item_ids= for Foo.has_many :items def ids_writer(ids) pk_column = reflection.primary_key_column ids = Array.wrap(ids).reject { |id| id.blank? } ids.map! { |i| pk_column.type_cast(i) } replace(klass.find(ids).index_by { |r| r.id }.values_at(*ids)) end [/code] This method gets called by the People controller in the update action (@person.update_attributes params[:person]), which in turn deeper in Rail''s guts arrive to the pinpointed method when accessing an *_ids writer... What is very weird, is that pk_column is nil (He...
2005 Dec 30
3
Too many columns for list.rhtml to display on one page
I''ve gone once through the Agile book and am now attempting my own rails app. I''ve created a table named ''volunteers'' with over 15 columns. The problem is the default list.rhtml that is created with the scaffold, shows all the columns. I only want to show 4 of them with the list view. Where would I start to only return a handfull of columns to the