search for: unscop

Displaying 8 results from an estimated 8 matches for "unscop".

Did you mean: inscop
2010 Sep 13
0
unscoped option for associations?
...I recently encountered a problem in my FriendlyId plugin where a belongs_to association unexpectedly failed to load because a user was using state_machine and a default scope to make only "active" records return by default. It seems logical to allow associations to be specifed as "unscoped" in order to bypass any default scopes. Conceptually I see this as similar to the difference between initialize and allocate. For user application code the solution can be "use a scope, not a default scope" but in the context of a plugin I think there are times where this functiona...
2011 Sep 15
1
bypass defualt scope.
...nd in the Shop show view I have: - for document in @shop.documents %li(id="shop_documents")= link_to document.subject, shop_document_url(@shop, document) I want list document based on reference_date attribute and not using default scope. I''ve tried: def show @shop = Shop.unscoped.find(params[:id], :include => :documents, :order => "documents.reference_date") but don''t work. -- 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-/JY...
2012 Jul 05
2
Addition to has_many - a ':source_scope' option
Was looking to work on a small addition (to has_many) which will be useful to me and others alike. A few technical details about the addition: Basically wanting to have something like, has_many :subscribers, through: :subscriptions, *source_scope:* :deleted We currently have to do this in our code as, has_many :subscribers, through: :subscriptions, conditions:
2013 Jan 08
0
[LLVMdev] [cfe-dev] LTO "bug" and Clang warnings
...; completely right and nothing should be done. > > I do believe it's undefined. §5.2.1 Subscripting [expr.sub] 1/ A postfix expression followed by an expression in square brackets is a postfix expression. One of the expressions shall have the type “pointer to T” and the other shall have unscoped enumeration or integral type. The result is an lvalue of type “T.” The type “T” shall be a completely-defined object type.62 The expression E1[E2] is identical (by definition) to *((E1)+(E2)) §5.7 Additive operators [expr.add] 5/ When an expression that has integral type is added to or subtrac...
2006 Nov 21
5
acts_as_ferret with STI models
Can acts_as_ferret search only one of the inherit models in the hierarchy of STI models? Say you have Contents, with types articles and comments. I know that you do Contents.find_by_contents, but can you also create indexed for Comment and Articles? Thanks for you help Miguel -- Posted via http://www.ruby-forum.com/.
2013 Jan 08
4
[LLVMdev] LTO "bug" and Clang warnings
On 8 January 2013 16:53, David Blaikie <dblaikie at gmail.com> wrote: > I'm not sure what you mean by "fix user's stupidity" here - could you > clarify? > Buffer overrun on foo[20] and relying on it for bar[20]. It might not even be an error to access foo[50] even though foo only has 20 elements (via pointer indirection rules), but it's user error to do so,
2007 Dec 03
18
Need help mocking this out
Let''s say you''re using the restful_authentication plugin. You have a model called articles. On the index action of the articlescontroller you simply want to spec out that it''ll scope the results to the ownership of the current_user. It should NOT include any articles other than the articles that user owns. How would you properly spec this out? Thanks for the help!
2017 Jun 21
6
RFC: Cleaning up the Itanium demangler
...ame(first, last, db); if (t != first) first = t; break; default: t = parse_operator_name(first, last, db); if (t != first) first = t; break; }; } return first; } // <unscoped-name> ::= <unqualified-name> // ::= St <unqualified-name> # ::std:: // extension ::= StL<unqualified-name> template <class C> const char* parse_unscoped_name(const char* first, const char* last, C& db) { if (last - first >= 2)...