search for: some_object

Displaying 20 results from an estimated 23 matches for "some_object".

2006 Feb 07
0
Rendering objects directly via <%= render @some_object %>
My original post might have been overlooked by most, but I''ve made a plugin (link below) which allows rendering of objects directly via the render method: <%= render @some_object %> which would actuall render the @some_object object (the object is even able to handle the options hash. Rendering would actually be handeled by the object itself, by leaving it up to the object to inteact with the template and parse the wished for options hash back to the ActionView rende...
2006 Jul 26
1
Polymorphic Associations: dynamic finders
Is there any sort of dynamic finder for polymorphic associations? For example if I had: class InviteNode < ActiveRecord::Base belongs_to :inviteable, :polymorphic => true end I would like to be able to search by: InviteNode.find_by_inviteable(some_object) instead of having to do: InviteNode.find_by_inviteable_id_and_inviteable_type(some_object.id, some_object.class.name) obviously I could write my own, but am I missing something? Is there a reason Rails doesn''t provide something like this for you? - steve
2015 Jan 27
7
[LLVMdev] IR extension proposal: bitset constants
...set globals in a specifically named section, and place the referenced globals in individual sections so that the linker can rearrange them. As previously mentioned, an intrinsic would be used to test entries in the bit set at call sites. For example, the relevant IR for the following C++ code: A *some_object = ...; some_object->f(); might look like this: %vtable = load i8** %some_object %p = call i1 @llvm.bitset.test(i8* %vtable, i8* @_ZBS1A) readnone br i1 %p, label %continue, label %trap In the LTO case, such intrinsic calls would be lowered by the bitset lowering pass into the appropriate rang...
2015 Jan 28
3
[LLVMdev] IR extension proposal: bitset constants
...ferenced globals in individual sections so that the linker >> can rearrange them. >> >> As previously mentioned, an intrinsic would be used to test entries in the >> bit set at call sites. For example, the relevant IR for the following C++ >> code: >> >> A *some_object = ...; >> some_object->f(); >> >> might look like this: >> >> %vtable = load i8** %some_object >> %p = call i1 @llvm.bitset.test(i8* %vtable, i8* @_ZBS1A) readnone >> br i1 %p, label %continue, label %trap >> >> In the LTO case, such intrinsi...
2010 May 27
4
[PATCH] Rails 3: fields_for helper doesn't work with association proxy objects
Request for eyeballs. :-) Mongoid uses association proxy objects. It overrides #nil? => false when the association is missing. However since it uses proxy objects, !!assocation is always true. I have created a ticket with a patch that changes the association nil test to call assocation.nil? rather than use implicit coercion of the variable. See:
2015 Jan 29
3
[LLVMdev] IR extension proposal: bitset constants
...n rearrange them. > > >> > > >> As previously mentioned, an intrinsic would be used to test entries > in the > > >> bit set at call sites. For example, the relevant IR for the following > C++ > > >> code: > > >> > > >> A *some_object = ...; > > >> some_object->f(); > > >> > > >> might look like this: > > >> > > >> %vtable = load i8** %some_object > > >> %p = call i1 @llvm.bitset.test(i8* %vtable, i8* @_ZBS1A) readnone > > >> br i1 %p, label %...
2008 Jul 04
2
How to make WHERE foo_id IN () query?
Hi, There are 3 models: A has_many :Cs B has_many :Cs C belongs_to A and B I got a single object of A and an array of B objects. How can I get all Cs that have a_id equal to object A.id *and* b_id that belongs to an object in Bs array? Regards --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Apr 24
1
Just a couple questions on how I should go about
...g and comment/add things. Any idea how I > should go about it? there''s a brazillion solutions, but a good place to start might be the login engine: http://www.rails-engines.org/login_engine then in your controller code you can auth against the logged-in user: if session[:user].id == some_object.owner_id # do stuff end best, john ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
2015 Jan 30
0
[LLVMdev] IR extension proposal: bitset constants
...section, > and place the referenced globals in individual sections so that the linker > can rearrange them. > > As previously mentioned, an intrinsic would be used to test entries in the > bit set at call sites. For example, the relevant IR for the following C++ code: > > A *some_object = ...; > some_object->f(); > > might look like this: > > %vtable = load i8** %some_object > %p = call i1 @llvm.bitset.test(i8* %vtable, i8* @_ZBS1A) readnone > br i1 %p, label %continue, label %trap > > In the LTO case, such intrinsic calls would be lowered by the b...
2006 Aug 15
2
Unit Testing Problem
I''m having a bit of difficulty when testing my models, I''ve read a few times the testing chapter in Agile web development with rails and at http://manuals.rubyonrails.com/read/chapter/27 but i''m still unsure of what I should be testing. Firstly I''d like to be able to test things like my email validation using lines such as assert User.new(:email =>
2019 Nov 10
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...t;only truly correct" ;-) > > inherits(x, "...") > or > is(x, "....") # if you're advanced/brave enough (:-) to > # use formal classes (S4) Thanks for the helpful blog post Martin. Is the following ?test_class? %in% class(some_object) which I think in your symbols would be ??? %in% class(x) safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . Thanks, Bryan
2019 Nov 11
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
.....") >>> or >>> is(x, "....") # if you're advanced/brave enough (:-) to >>> # use formal classes (S4) >> >> Thanks for the helpful blog post Martin. Is the following >> >> ?test_class? %in% class(some_object) >> >> which I think in your symbols would be >> >> ??? %in% class(x) >> >> safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . > Those aren't equivalent if S4 gets involved. You c...
2006 Jul 08
1
Ajax, RJS, and Standard Form Errors
Hi all, I''m trying to take the standard scaffold and add a bit for ajax to it. I have a two column page with the list on the left and the right side is reserved for the create/edit actions. On a successful save my rjs executes and updates the list view on the left and returns the right side to a "home" page. However, if one of the model validations fail I use rjs ro
2009 Oct 29
4
manipulating form
Hi, I work with forms and i won''t to set a name for a form to use javascript functions.. How can i do Thanks
2007 Nov 08
0
Models for external REST services
...============ On the side of the controlloer I have no idea how to start, this is what I think it should look like, def do_sign_in @sign_in_form #this should come from the form in the view, I have no idea how to get this object api_url = "www.example.com/some_api.php" response = some_object.do_post (api_url, :params =>{ "api_key" => @key, "param1" => @sign_in_form.field1, "param2" => @sign_in_form.field2, } ) # after this we should go to a do_sign_in.rjs and do all the ajax updates end #============================ --~--~---------~--~---...
2005 Jul 08
2
Multiple language support
Hi I am a newbie on Rails. I am trying to figure out how to implement a multiple language site. How do you deal with navigation, error messages coming from Rails etc. Anybody have practical suggestions? Tnx -- PC -- PC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2019 Nov 10
0
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...;> inherits(x, "...") >> or >> is(x, "....") # if you're advanced/brave enough (:-) to >> # use formal classes (S4) > > Thanks for the helpful blog post Martin. Is the following > > ?test_class? %in% class(some_object) > > which I think in your symbols would be > > ??? %in% class(x) > > safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . Those aren't equivalent if S4 gets involved. You can see it if you run this code: example("new&qu...
2019 Nov 12
0
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...>>> is(x, "....") # if you're advanced/brave enough (:-) to > >>> # use formal classes (S4) > >> > >> Thanks for the helpful blog post Martin. Is the following > >> > >> ?test_class? %in% class(some_object) > >> > >> which I think in your symbols would be > >> > >> ??? %in% class(x) > >> > >> safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . > > > Those aren&...
2012 Jan 27
4
Redirecting to create new page with input
Rails 3.1.3 I believe this is a very very fundamental question, but since I am new to Rails, it''s more productive to ask someone to point out what I need to do. Say, I have a search method that generates a list of youtube videos. I have completed this part. And also, I have set up a database, Video, whose fields are video_title and URL. I need to place a button to each of these video
2006 Mar 14
21
Changing default date format in Rails
I''ve spent all day digging through the rails api and postgres-pr on this, I think it''s time to ask the list. Postgres stores a Date in YYYY-MM-DD format. My users want the dates in MM/DD/YYYY format. Sure, I could explicitly convert it on the app level every place where a date is displayed, but that seemed like a DRY violation. I thought I''d be clever and simply