similar to: Instantiating multiple child objects

Displaying 20 results from an estimated 300 matches similar to: "Instantiating multiple child objects"

2006 Feb 03
2
_form rendering question for adding multiple child objects
Hi I have been following a thread here.. http://www.ruby-forum.com/topic/new?forum_id=3 but it did raise some new curiosities that I hope someone can help address here :) In particular it is with Duane''s super secret hack that works for multiple child objects > There''s a super-secret and mostly undocumented way of doing this > that''s kind of handy, actually.
2006 Mar 21
13
"Remembering" link to redirect to after logging in
Hi, Suppose I have a resource such as http://localhost:3000/topsecret/data that requires the user to login first. What I did was make use of before_filter to check and see if the session variable is set with the logged in user''s id (similar to the example in "Agile Web Development with Rails"). However while the filtering function does work correctly in redirecting the
2006 Mar 23
1
Implementing a model with logging?
Hi, I''ve been trying to work out a model (let''s say a StudentRecord) which has a number of attributes, and the key thing I''m trying to do here is to implement it such that you can actually view modifications made over time by various users (think of it as a wikipedia style of logging). Is there some provision in rails that''d provide this functionality for
2006 Feb 04
1
Error when using form helper and child objects
Hi, This is one problem that has gotten me stumped for quite a while. I have an Item that has_many :DeliveryMethod, and what I seek to achieve is to create a form that''d let me create an Item, as well as its DeliveryMethods in 1 single form. And so I tried something like: <%= text_field_tag ''Item[DeliveryMethod][price]'', @Item.DeliveryMethod ?
2006 Jan 13
5
Form field naming semantics question
Hi, I have a question today regarding how the various form elements in _form.rhtml are named. I understand that for a database table "persons" with a column headed by "name", then in _form.rhtml it will probably be like: <p><label for="person_name">Name><br/> <%= text_field ''person'', ''name''
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys, I have been working on a form that would use javascript to validate the data before submitting it, and from my view.rhtml I have a statement like this: However such a statement generates a HTML tag that looks like this: <form action="/users/Login?onSubmit=validate%28%29" method="post"> Seems like Rails thinks it is a parameter instead of an option, so
2006 Jan 17
2
Instant Rails request lags >4 sec
Hello RoR folks, I am using Instant Rails and a small app that currently uses scaffolding for CRUD on just one table with 7 attributes. I am not shure wether scaffolding slows down the app that much but I have a time lag for every request with above 4 sec. The preinstalled apps like Type are running damn fast, which is not the case for my stuff. Any help on this would be great Thanks, RTG --
2010 Mar 08
0
Instantiating Controller Object on Rails3 for unit testing
Dear all, I am experiencing this error when doing unit testing: Authlogic::Session::Activation::NotActivatedError: You must activate the Authlogic::Session::Base.controller with a controller object before creating objects I know this is not an error from Rails but I encounter this when doing unit testing in Rails. This error happenned because my model has dependencies to 3rd Party library named
2007 Apr 17
1
[LLVMdev] Instantiating the new Instructions from CallInst Class
Hello All, I'm developing timing analysis tool using LLVM. After several analysis phases, I want to instantiate several instructions in the basic block. Instructions that I try to instantiate are like below; call void (int)* %waitABC(int 10) %tmp = call int (int, int*)* %doABC(int %i, int* %total) I think I should use 'CallInst' class in 'Instructions.h' file. How I could
2014 Feb 21
0
instantiating a reference class with an initialize() method from .onLoad fails
PkgA has a single R/binding.R file containing .A <- setRefClass("A", methods=list(initialize=function(...) {})) .onLoad <- function(...) .A() A NAMESPACE with import(methods) exportClasses("A") and DESCRIPTION Package: PkgA Type: Package Title: Documenting reference classes Version: 0.0.1 Date: 2012-08-05 Author: Martin
2006 Mar 24
1
Modifying a session variable from a different process?
Hi, I''ve implemented a log in session "thing" that essentially works by holding the model of the logged in user in a session variable, like this: session[:user] = user However let''s say at this point in time, should an administrator of the system decide to revoke this user''s account, the session variable for that currently logged in user is still valid,
2006 Jan 12
1
Does rails support method overloading?
I''ve tried to have 2 methods of the same name (but with different parameter signatures) and it always seems like the later declaration tends to win out, does this mean that ruby does not support overloading? If so what aboutt the .new method? You can either call it as .new (with nothing) or .new(hash variable). Is it possible to override a specific instance of the zero parameter
2006 Jan 14
2
Why can''t I changed the _session_id cookie?
Hi, I noticed that there is a cookie set by my rails scaffold that contains a 32 character hash code in it, but when I tried to change its value using Cookies[:_session_id], nothing happened, it stays the same! How am I supposed to change the session_id? Thanks. -- Posted via http://www.ruby-forum.com/.
2011 Jun 21
1
[LLVMdev] Instantiating a JIT on win64
hi all, I'm trying to write an LLVM-based interpreter for a small DSL that we have. The language is very simple (essentially a calculator), but I'd like it to execute efficiently. I've been following the tutorial, and have the following code for instantiating an ExecutionEngine: #include <LLVM\ExecutionEngine\JIT.h> #include
2009 Oct 01
2
Any way to avoid instantiating a class twice?
Hey everyone, I''m trying to find a work around for a performance problem I''ve been having. I have a class that builds paths (among other things) dynamically to many files and folders depending on what sets of information the user accesses. Once built, this class instantiation contains all the information necessary for several pages (controllers/views) to operate. However at
2007 Dec 26
0
[LLVMdev] Instantiating modules from .bc files
Hi Danny, On 2007-12-26, at 15:39, Danny wrote: > I've noticed that the BitcodeReader appears to be an internal > module, but the BitstreamReader is public. Should I be using the > BitstreamReader? If so how. The generic BitstreamReader class is public because it's used in other projects, including clang, to serialize data structures other than LLVM IR. The coding of
2013 Jul 16
1
[LLVMdev] Instantiating Target-Specifc ASM Parser
Hello, I am working on backend development and would like to utilize my target's MCAsmParser inside of an MCInst-level class implementation. I noticed that the AsmParser is registered with the target registry however I am having no luck grepping for a "template" of how to instantiate it and have yet to find specific documentation on how it is done. Any ideas or help is greatly
2010 Aug 14
0
[rails3.0.0.beta4] extend form_tag to always include a hidden field
hi there, I want every form in the site to add a hidden_field, basically I want them to always submit the I18n.locale, I''ve tried to alias form_tag_html method of ActionView::Helpers::FormTagHelper like this: # in #{MY_APP_ROOT}/lib/action_view/helpers/form_tag_helper.rb module ActionView::Helpers::FormTagHelper def form_tag_html_with_locale(html_options) form =
2007 Dec 27
1
[LLVMdev] Instantiating modules from .bc files
That worked quite well. Thank you. One question as a follow up: is there a nice/standard way of including the pre-made bitcode chunks in with the binaries that are being created which read them? Bascially, I'd like to have the same functionality, but rather than having one or more .bc files running around which need to be read at runtime by an executable, moving that into the code
2007 Dec 26
2
[LLVMdev] Instantiating modules from .bc files
Hey there, I'm relatively new to the llvm scene, and so far I'm liking it quite a bit. I'm a bit perplexed as to what llvm-gcc's role is in everything. I've used it to create .bc files for really simple functions and it seems to do quite well at that, but I've been trying to figure out how to take the output from llvm-gcc and actually use it in another program.