similar to: Fallback for partial_paths on rendering process

Displaying 20 results from an estimated 11000 matches similar to: "Fallback for partial_paths on rendering process"

2011 Apr 05
1
Why does AR use base_class for polymorphic relationship "type"
I have a couple models that inherit from a base class that then inherits from AR. When they are used in a polymorphic relationship the "type" is always the base class. Just curious if anyone has a reason why it doesn''t use the *actual* class rather then the base_class. I have patched AR to use the actual class if !base_class.table_exists? but it adds another query each time
2013 Feb 26
0
Rendering nested resources
Hello, I have following models: States has_many Cities Cities has_many Streets Streets has_many Houses Houses has_many People In the routes.rb I have all these set as nested resources so I can view all the Cities of specific State as /states/1/cities, all the Streets of given City as /cities/15/streets, all the Streets of specific State as /states/27/streets, etc. Now in the houses#show
2006 Jul 31
3
Polymorphic associations and single table inheritance
Running into an interesting problem that at first glance appears to be a bug in the AR association code. However, it''s explicitly coded this way so I''m not so sure. I have some code like this: class Address < ActiveRecord::Base belongs_to :addressable, :polymorphic => true end class Person < ActiveRecord::Base has_many :addresses, :as => :addressable,
2007 Nov 20
2
Plugin: create instance methods dynamically in ClassMethods?
Hi all I have the following plugin code: module IncenseCrud def self.included(base_class) base_class.extend(ClassMethods) end module ClassMethods def performs_incense_crud def index list return render(:action => ''list'') end end end end In init.rb I have the following: require File.dirname(__FILE__) +
2011 Apr 06
1
Time to fix PartialRenderer#partial_path
For the longest time PartialRenderer#partial_path has prefixed the prefix of the current controller when it is nested in a module. This hasn''t been a problem (because nesting controllers wasn''t that common) but with 3.1 striving for better engine support, this problem is now larger because all of your controllers for an engine will be nested and it makes doing <%= render
2004 Aug 06
0
vobris icecast 2
hi, I am trying to get Vorbis streaming from live input to a icecast2 (win32) server. I am doing this on my local 192.168.22.x network. I can get oddcastDSP encoder to stream to the icecast server. It makes a source connection and I can see this is the Icecast2 Win32 Server Stats window. I can also see the KB sent in the oddcastDSP window. However I have the following problems: 1. I cant make a
2006 Mar 20
3
help: acts_as_versioned setup error "undefined local variable or method ''base_class''"
Hi All, Rails newbie here trying to set up acts_as_versioned according to Chapter 14 in the Rails Recipies book. I''ve taken the following steps (nearly verbatim) as mentioned by the book: - created the target model "Post" - added the "acts_as_versioned" label to the model file - generated a migration file - added the table creation code and the command
2006 Jul 15
2
FieldQuery not returning anything
Hey .. The QueryParser RDoc page explains to me on how to search for a specific value in a specific field. This is not working the way i thought it should be, what am i doing wrong? Here''s an example .. I''m storing model data in the index like this: doc << Field.new( "object_id", object.id, Field::Store::YES) doc << Field.new( "type",
2011 Oct 06
1
[LLVMdev] TableGen For Loops
greened at obbligato.org (David A. Greene) writes: > So here's why I think the for loop proposal can't be a preprocessing > phase. Down in the guts of this I fundamentally need to be able to do > this: > > multiclass blah<list<int> Values> { > for v = Values { > def DEF#v : base_class<v>; > } > } > > Will that work? Is the for
2007 Jun 04
1
acts_as_rateable in Beast
I''m trying to implement acts_as_rateable to my Beast installation to give users the option to rate posts (like reddit). I chose acts_as_rateable as it supposedly easily allows reddit-type voting but I''m having some problems setting it up and the documentation seems outdated. (http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/) So far, I''ve
2017 Oct 16
1
Download data from NASA for multiple locations - RCurl
I have done the following using readLines directory <- "~/" files <- list.files(directory) data_frames <- vector("list", length(files)) for (i in seq_along(files)) { df <- readLines(file.path(directory, files[i])) df <- df[-(1:13)] df <- data.frame(year = substr(df,1,4), month = substr(df, 6,7), day =
2017 Aug 03
0
Results of vcovCL (sandwich) and of cluster() in Stata
Hi, I'm trying to reproduce with R the results of this study: https://learn.gold.ac.uk/mod/resource/view.php?id=262406 More precisely I want to reproduce the results of the table 6 (pag.280), which can also be seen here: http://picpaste.de/pics/table-robin-llKCOeWV.1501745645.png Let's take the first column: we have a coeff. of 0.097 and a SE of 0.026, which represents clustered robust
2011 Oct 06
4
[LLVMdev] TableGen and Greenspun
greened at obbligato.org (David A. Greene) writes: > The problem I solved via multidefs was this: how does one write a set of > Pat<> patterns in a generic way? > > For example, I want to be able to do this: > > defm MOVH : > vs1x_fps_binary_vv_node_rmonly< > 0x16, "movh", undef, 0, > // rr > [(undef)], >
2010 Aug 02
1
Drop down boxes from table data
Hi I have another question for how best to do this. Now I have been following the tutorial at: http://www.tunaslut.com/learning-ruby-drop-down-lists-in-one-to-many-relationships, however when I change the view over from <% @cities.each do |city| %> <tr> <td><%=h city.city_name %></td> <td><%=h city.country_id %></td> to: <%
2017 Oct 16
0
Download data from NASA for multiple locations - RCurl
> On Oct 15, 2017, at 3:35 PM, Miluji Sb <milujisb at gmail.com> wrote: > > Dear David, > > This is amazing, thank you so much. If I may ask another question: > > The output looks like the following: > > ### > dput(head(x,15)) > c("Metadata for Requested Time Series:", "", "prod_name=GLDAS_NOAH025_3H_v2.0", >
2017 Oct 15
0
Download data from NASA for multiple locations - RCurl
> On Oct 15, 2017, at 2:02 PM, Miluji Sb <milujisb at gmail.com> wrote: > > Dear all, > > i am trying to download time-series climatic data from GES DISC (NASA) > Hydrology Data Rods web-service. Unfortunately, no wget method is > available. > > Five parameters are needed for data retrieval: variable, location, > startDate, endDate, and type. For example:
2012 Mar 22
1
why doesn't .where() honor polymorphism?
I love the query interface (ActiveMethod::QueryMethods), but one thing has bugged me: why doesn''t it generate calls for polymorphic associations? For example: class MyModel < ActiveRecord::Base belongs_to :parent, :polymorphic => true end I would expect: MyModel.where(:parent => a) to be equivalent to: MyModel.where("my_models.parent_id = ? AND
2008 Sep 25
1
defining polymorphic type condition
As great as Rails 2.1 is, I for the life of me cannot figure out why polymorphic associations do not support reconfiguring the type column used. For example, I have no way to do a polymorphic association using a lookup hash which maps an integer to a class name. Storing a TINYINT unsigned is waaaaay more efficient than storing a string like "SomeActiveRecordModel" over and over again.
2011 Oct 06
0
[LLVMdev] TableGen For Loops
On Oct 6, 2011, at 10:25 AM, David A. Greene wrote: > greened at obbligato.org (David A. Greene) writes: > >> So here's why I think the for loop proposal can't be a preprocessing >> phase. Down in the guts of this I fundamentally need to be able to do >> this: >> >> multiclass blah<list<int> Values> { >> for v = Values { >>
2012 Jun 07
0
Query regarding SVD of binary matrix:
Hello, I have a binary matrix of 80k sets (sets comprising of combination of cities) by 885 cities (dimension = 80k x 885). For matrix, 1 means city is a part of the set and 0 means the city is not part of the set. Sets are rows and cities are columns (city.test). I want to do feature reduction to only keep important sets (most likely 2-10 sets of city combinations) and the associated cities.