similar to: accessing constants in model from controller.

Displaying 20 results from an estimated 10000 matches similar to: "accessing constants in model from controller."

2006 Apr 28
2
entries that match a regexp
Hi all, I am trying to filter the element of a df that start with "TF", like this: alfa = c(123221,"TF13124",41243,"TF1234",32414,"TF13124","TF14333",2134123,"TF1234") beta =
2016 Feb 15
0
[PATCH 23/23] nvc0: implement support for maxwell texture headers
From: Ben Skeggs <bskeggs at redhat.com> Adds support for the new TIC layout that's present on Maxwell GPUs, heavily based on the code for the existing layout. This code is required for GM20x support. While GM10x supports the older layout still, this commit switches it to use the updated version instead. Piglit testing shows zero regressions on GM107. Signed-off-by: Ben Skeggs
2016 Feb 15
0
[PATCH 23/23] nvc0: implement support for maxwell texture headers
On 02/16/2016 03:47 AM, Ilia Mirkin wrote: > Can you push this to a repo somewhere? I want to see what the final > version looks like after all your changes, but it's hard to see that > with these patches. https://github.com/skeggsb/Mesa/commits/master > > On Mon, Feb 15, 2016 at 12:38 AM, Ben Skeggs <skeggsb at gmail.com> wrote: >> From: Ben Skeggs <bskeggs at
2013 Nov 03
2
[PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
The device name prefix for IDE hard drives used to be `ad' but now is `ada' (http://www.freebsd.org/doc/handbook/disks-naming.html). For virtio hard drives it is `vtbd'. Under an mbr partition table a slice will be used, so the name of the first partitions will be either ada0s1a or vtbd0s1a. Under a GPT partition table, where no slice is needed, the name of the first partition will be
2016 Feb 15
2
[PATCH 23/23] nvc0: implement support for maxwell texture headers
Can you push this to a repo somewhere? I want to see what the final version looks like after all your changes, but it's hard to see that with these patches. On Mon, Feb 15, 2016 at 12:38 AM, Ben Skeggs <skeggsb at gmail.com> wrote: > From: Ben Skeggs <bskeggs at redhat.com> > > Adds support for the new TIC layout that's present on Maxwell GPUs, > heavily based on
2006 Jul 28
2
passing a variable from controller to model
Hi, How do I pass a variable from my action into a model before saving the model. I''d like the model instance to have access to this variable to do some work before saving the model instance but the variable is not part of the model itself. Thanks, Sam -- Posted via http://www.ruby-forum.com/.
2013 Nov 04
0
Re: [PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
On Sun, Nov 03, 2013 at 11:16:23PM +0200, Nikos Skalkotos wrote: > + char type_c = (strcmp (type, "vtbd") == 0) ? 'v' : 's'; > int disk_i = guestfs___parse_unsigned_int (g, disk); > int slice_i = guestfs___parse_unsigned_int (g, slice); > int part_i = part[0] - 'a' /* counting from 0 */; > @@ -1481,7 +1501,7 @@ resolve_fstab_device
2006 May 23
4
''key not found'' problem with saving model object.
Hello, I have the following structure: model foo has_many :bars:, :dependent => true end model bar belongs_to :foo end In my action, when i try to save foo: def save begin f = foo.new f.a = 5 begin b = bar.new b.a = 10 f.bars << b rescue Exception => exc ... end f.save! <-- This does not happen
2006 May 10
2
accessing uploaded file on filesystem question.
Hi, I''m able to upload files onto my webserver filesystem but I had a question regarding how I''d go about accessing them using the <img src="..." > tag. If my files, i.e pictures, are being uploaded to public/images/<dir>/filename.jpg, then should I store the entire path, or just the picture name in my database table? I would imagine storing just the
2006 May 16
4
question about strftime when called from partial.
Hi, I''m calling a helper I''ve written - format_time() that is called from my views with a given time that was selected from my database and was returned to the view via an instance variable. When I call format_time from a partial, I see that I get some kind of String error and the partial won''t render. Basically, the object being passed in to format_time is already a
2006 Jan 26
3
Newbe:Where declare constants visible in view & controller ?
I am using some constants that should be visible in the controller and in a view. Declaring the constant in the controller does not make the constant visible in the view. So my question: Where can I declare the constant to be visible in all views and controllers ? Thanks a lot in advance Christian -- Posted via http://www.ruby-forum.com/.
2006 May 07
1
file_column problem - uninitialized constant Magick
Hi, I''m on Windows and getting the following error while trying to use file_column with RMagick, uninitialized constant Magick C:/INSTAN~1.0/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' #{RAILS_ROOT}/vendor/plugins/file_column/branches/kyle/lib/file_column.rb:621:in `file_column'' I installed file_column by
2006 May 30
3
expected, got Fixnum problem.
Hi, I was wondering if anybody knew what ''<some type> expected, got Fixnum'' means? My code looks like the following: begin anevent = Event.new anevent.title = params["event"]["title"] anevent = session[:user_id] com = Community.find(params[:id]) com.events << anevent rescue Exception => exc ... end But I get an
2006 May 22
3
rails naming convention for model: community
Hello, How does Rails deal with the pluralization of community. I have "community" as my model name. Will Rails automatically look for a table name "communities" or do I have to name the table "communitys"? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 May 10
2
getting absolute paths on files on filesystem.
Hi, I''d like to be able to store the absolute path for a file so that I could use <img src = "...." > and give it the path to the file I''d like to display. I was wondering if there is an easy way to do this and whether there are any issues with this on Windows. thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jun 06
4
Checking if a directory is empty using File
Hi, I have one minor issue. I''m trying to check whether a directory is empty given some path to the directory. My code does the following: if(File.directory?(dirpath)) # dirpath = public/images/1 if(File.zero?(dirpath)) FileUtils.rm_rf(dirpath) end end The problem is, while testing this, if I put a file in the directory and run the above code, it still ends up deleting the
2007 Jan 05
0
[827] trunk/wxruby2/swig: Moved NULL objects into constants so they can be used for default args
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2006 Mar 13
0
Controller handling of Non-model fields
I''m a bit confused about how the Controller works for calls that aren''t intended to be remote (non-Ajax). Specifically, if I don''t want to interact with a Model. Does ":action => whatever" always result in a call to the server? Or is it handled like a javascript function (locally, on the client) in the cases where no Model interaction is needed? For
2006 Aug 16
4
Accessing Constants Declared in Helper Modules
Hello all, I''m having great trouble accessing a constant declared in a helper for one of my view templates. I am trying to create a grouped selection list based on a predefined set of values. Rather than declare this set of values in the view, I wanted to put it in the helper that automatically gets included for the view. Unfortunately, it doesn''t seem to work. All methods
2003 Aug 27
2
How to test a model with two unkown constants
Hi all, suppose I've got a vector y with some data (from a repeated measure design) observed given the conditions in f1 and f2. I've got a model with two unknown fix constants a and b which tries to predict y with respect to the values in f1 and f2. Here is an exsample # "data" y <- c(runif(10, -1,0), runif(10,0,1)) # f1 f1 <- rep(c(-1.4, 1.4), rep(10,2)) # f2 f2 <-