search for: get_list

Displaying 7 results from an estimated 7 matches for "get_list".

Did you mean: net_list
2006 Aug 17
3
What''s the best way to stop repeating this line in my controller?
Hi, I am trying to follow the "DRY" principle and came across a problem. I am working on a small ajax task manager, and right now in the index page which renders the list, I have (for example, in the Lists controller): def index @lists = List.find(:all) end Now within the controller there''s also a list_add action which is called via ajax.. def list_add if
2008 May 02
1
names of select elements inside a fields_for block not generated as expected
...<% form_for(@project) do |f| %> [project stuff here] <% for pp in @project.project_person %> <% fields_for ''project[proj_people_attributes][]'', pp do |pp_form| %> <p> Person: <%= collection_select(:pp, :person_id, Person.get_list, :id, :nom, {:prompt => ''Person?''}) %> Role: <%= select(:pp, :role, Person::ROLE_NAMES, {:prompt => ''Role?''}) %> </p> <% end %> <% end %> <% end %> I get the expected series of 3 <select>s...
2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...match_string "object" v) -let get_array = function - | JSON_parser_array x -> x - | _ as v -> assert_failure (type_mismatch_string "array" v) +let get_dict = function + | JSON.Dict x -> x + | _ as v -> assert_failure (type_mismatch_string "dict" v) +let get_list = function + | JSON.List x -> x + | _ as v -> assert_failure (type_mismatch_string "list" v) let test_tree_parse_invalid ctx = @@ -101,28 +100,26 @@ let test_tree_parse_basic ctx = let test_tree_parse_inspect ctx = let value = json_parser_tree_parse "{\"foo\&q...
2018 Aug 22
3
[PATCH v2 0/2] mltools: JSON: unify JSON & JSON parser.
v2: - Added back the null value. - Reran the tests. Rich.
2006 Aug 12
10
adding extra variable to a class, how to access it?
...t;</h1> <% for town in county.towns %> <p><%= town.name %></p> <p><%= town.total %></p> <% end %> my town model: class Town < ActiveRecord::Base belongs_to :county attr_reader :total @total def self.get_list @total = 100 find(:all) end end -- Posted via http://www.ruby-forum.com/.
2018 Aug 20
6
[PATCH 0/4] mltools: JSON unification
An evolution of: https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
2009 Oct 26
0
[PATCH node] Users can now work with remote libvirt hosts.
...ot; % default_url) + return default_url + +class VirtManagerConfig: + def __init__(self): + self.__conf = gconf.client_get_default() + self.__conf.add_dir("/apps/virt-manager", gconf.CLIENT_PRELOAD_NONE) + + def get_connection_list(self): + return self.__conf.get_list("/apps/virt-manager/connections/uris", gconf.VALUE_STRING) + + def add_connection(self, connection): + connections = self.get_connection_list() + if connections.count(connection) is 0: + connections.append(connection) + self.__conf.set_list("/ap...