search for: region_id

Displaying 20 results from an estimated 26 matches for "region_id".

2006 Aug 14
1
What fields_for really for?
Hello everyone! I have 3 models: === 1 === class Region < ActiveRecord::Base has_many :districts end === 2 === class District < ActiveRecord::Base belongs_to :region has_many :suburbs end === 3 === class Suburb < ActiveRecord::Base belongs_to :district validates_numericality_of :region_id, :only_integer => true end In edit.rhtml for SuburbController I need to specify region_id. There is no region_id in suburb model so first I added these lines to it: ... class Suburb < ActiveRecord::Base belongs_to :district attr_writer :region_id def region_id district.region_id i...
2006 Aug 16
1
how to update a collection_select from another
..._id = ?", ''1''],:order=>"id") @provinces = Region.find(:all, :conditions => [ "parent_id = ?", @region.parent.id],:order=>"id") end The problem is that it doesn''t even display the onChange javascript code: <select id="region_id" name="region[id]"><option value="2">bla1</option> <option value="3">bla2</option> <option value="4">bla3</option></select><br> <select id="region_id" name="region[id]"> <opt...
2006 Apr 21
1
select box with multiple rows
I want a select box that displays 5 rows instead of one row and a drop down. so i figure this should work, but it doesn''t. <%= collection_select(:constellation, :region_id, @regions, :id, :name, html_options = {:size => ''5''})%> I am not quite sure how to use that html_options and googling around I didnt find anything directly on point. Any suggestions? Thanks, Mike ** ** -------------- next part -------------- An HTML attachment was scrubb...
2009 Aug 01
23
Hi doubt in unit testing
def test_check_for_validity post=County.new(:name=>"myname",:description=>"mydesc") assert post.save end above is the method and when i run unit test it is saying as 1) Failure: test_check_for_validity(CountyTest) [/test/unit/county_test.rb:10]: <false> is not true. what does it say i cannot under stand please help -- Karthik.k Mobile -
2016 Nov 02
0
[PATCH v3 05/15] secboot: remove fixup_hs_desc hook
.../* Write LS blob */ @@ -925,6 +928,69 @@ gm200_secboot_populate_hsf_bl_desc(void *acr_image, } /** + * struct hsflcn_acr_desc - data section of the HS firmware + * + * This header is to be copied at the beginning of DMEM by the HS bootloader. + * + * @signature: signature of ACR ucode + * @wpr_region_id: region ID holding the WPR header and its details + * @wpr_offset: offset from the WPR region holding the wpr header + * @regions: region descriptors + * @nonwpr_ucode_blob_size: size of LS blob + * @nonwpr_ucode_blob_start: FB location of LS blob is + */ +struct hsflcn_acr_desc { + union { + u8...
2009 Jan 08
4
Problem with disable_with
...ith the following JavaScript at the top which I use to validate form fields: <script type="text/javascript"> <!-- function validate(){ if ((document.myForm.email_projectname.value=="")|| (document.myForm.email_projecttype_id.selectedIndex<1)|| (document.myForm.email_region_id.selectedIndex<1)) { alert ("You must fill in all of the required fields!") return false } else return true; } //--> </script> further down the page I have the form: <% form_tag({:action => ''sendregistration''}, {:name =>...
2012 May 03
1
Help with getting values from string
...gs. But it does not seem to work. Please help. I have written down my code and the error message please tell me how to pass the value that a string points to. Thanks in advance #macro defined machist_occ_kgfs<-defmacro(a,qnu_occ,b,qnl_occ,expr={with(subset(an_ind_data_fin,income_source==a & region_id==b & normalised_income>qnl_occ & normalised_income<qnu_occ),hist(normalised_income,main=paste(a,b,sep=" ")))}) #macro called machist_occ_kgfs(occ,paste("qnu",ri,occ,collapse="",sep=""),ri,paste("qnl",ri,occ,collapse="",sep=&q...
2009 Feb 02
9
ActiveRecord Unexplainable SystemStackError - Only in WEBrick
...s in the trace ending before Set.empty? at: /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ attribute_methods.rb:64:in Here''s the relevant parts of my code: class Package < ActiveRecord::Base has_many :deliveries, #,:select=>''id, user, host, delivered, region_id, package_id'', :include=>:region, :dependent=>:delete_all def self.search(criteria) raise ArgumentError, ''argument must be of type SearchCriteria'' unless criteria.is_a\ ?(SearchCriteria) clause = build_search_where_clause(...
2005 Nov 02
4
acts_as_metadata?
I''m running into the need (on at least one project now) to implement end-user-customizable "metadata" or properties on model objects. The standard example would be a Person class that had first_name, last_name, etc. but would need to be extended real-time (through the web admin interface) with properties such as phone_number : varchar (30). I''ve done some basic
2006 Apr 10
0
parent - child help (RoR & MySQL)
...5 tables, 1 being the main table and 4 being lookup tables for the main. in the chart below, each of the xxxx_id fields has a corresponding table. I would like to be able to show just the result of the relationship. this is also outlined below. table_example: [id_of_object] object_id region_id state_id vendor_id other_info | | | | | | | | | | | | / \ | /...
2006 Jan 19
1
Populating a select field using observe_field
...#39;wine'', ''country_id'', @countries.collect {|c| [c.name, c.id]} %> <%= observe_field ''wine_country_id'', :url => { :controller => ''countries'', :action => ''regionOptions'' }, :update => ''wine_region_id'', :with => ''"id="+value'' %> </p> <p><label for="wine_region_id">Region</label><br/> <%= select ''wine'', ''region_id'', @wine.country.regions.collect {|r| [r.name, r.id]} %> &l...
2011 Aug 22
0
Paperclip nested resources problem
...ets do |asset| %> <% if asset.object.new_record? %> <%= asset.file_field :image %> controller: @country = Country.find(params[:country_id]) @region = @country.regions.find(params[:id]) 5.times { @region.assets.build } When uploading an image only the region_id is filled in and not the paperclip attributes. What i am doing wrong? Grtz..remco -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk...
2006 Jun 18
10
acts_as_enumerated
Hello All, Any one using acts_as_enumerated? I need help using (I like that it caches values in memory) I am working on a dating website and there are lots of options I want to store as enumerated like Status; divorce, single, Sex: male, female Eye color; blue, brown, green.... and lots more.... But I do not wanna keep them in seperate tables, and wanna keep them all together. Anyone has a
2009 Mar 14
9
null object pattern
...lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:479:in `const_missing'' from (irb):1 >> User.new => #<User id: nil, username: nil, section_id: nil, password_hash: nil, password_salt: nil, role_id: nil, member_number: nil, tm_zone_info: nil, region_id: nil> >> UnassignedUser.new => #<UnassignedUser id: nil, username: nil, section_id: nil, password_hash: nil, password_salt: nil, role_id: nil, member_number: nil, tm_zone_info: nil, region_id: nil> If I create user object first and then unassigneduser then it does not give any...
2018 Apr 25
0
[LLVM][RFC] Representing the target device information in the LLVM IR
On 4/25/2018 3:05 PM, Lin, Jin via llvm-dev wrote: > > RFC: Representing the target device information in the LLVM IR > > =========================================================================== > > Why this RFC change? > > ================= > > The target device information needs to be passed to the LLVM backend > when OpenMP backend outlining is enabled. For
2018 Apr 25
2
[LLVM][RFC] Representing the target device information in the LLVM IR
...load double, double* @gg, align 8, !tbaa !3 %1 = bitcast double %0 to i64 ... %12 = getelementptr inbounds [4 x i8*], [4 x i8*]* %.offload_baseptrs, i32 0, i32 2 %13 = bitcast i8** %12 to i64* store i64 %1, i64* %13, align 8 ... %20 = call i32 @__tgt_target(i64 -1, i8* @.omp_offload.region_id, i32 4, i8** %4, i8** %6, i64* getelementptr inbounds ([4 x i64], [4 x i64]* @.offload_sizes, i32 0, i32 0), i64* getelementptr inbounds ([4 x i64], [4 x i64]* @.offload_maptypes, i32 0, i32 0)) Thanks, Jin From: Friedman, Eli [mailto:efriedma at codeaurora.org] Sent: Wednesday, April 25, 2018 3...
2018 Apr 25
2
[LLVM][RFC] Representing the target device information in the LLVM IR
RFC: Representing the target device information in the LLVM IR =========================================================================== Why this RFC change? ================= The target device information needs to be passed to the LLVM backend when OpenMP backend outlining is enabled. For example, for multiple target devices, the target compilation has to generate a single host to support all
2016 Dec 14
18
[PATCH v5 0/18] Secure Boot refactoring
Sending things in a smaller chunks since it makes their reviewing easier. This part part 2/3 of the secboot refactoring/PMU command support patch series. Part 1 was the new falcon library which should be merged soon now. This series is mainly a refactoring/sanitization of the existing secure boot code. It does not add new features (part 3 will). Secure boot handling is now separated by NVIDIA
2016 Oct 11
10
[PATCH 0/8] Secure Boot refactoring
Hi everyone, Apologies for the big patchset. This is a rework of the secure boot code that moves the building of the blob into its own set of source files (and own hooks), making the code more flexible and (hopefully) easier to understand as well. This rework is needed to support more signed firmware for existing and new chips. Since the firmwares in question are not available yet I cannot send
2016 Nov 21
33
[PATCH v4 0/33] Secure Boot refactoring / signed PMU firmware support for GM20B
This revision includes initial signed PMU firmware support for GM20B (Tegra X1). This PMU code will also be used as a basis for dGPU signed PMU firmware support. With the PMU code, the refactoring of secure boot should also make more sense. ACR (secure boot) support is now separated by the driver version it originates from. This separation allows to run any version of the ACR on any chip,