similar to: with_scope and filters for Rails 1.1 (scoped_access plugin)

Displaying 20 results from an estimated 1000 matches similar to: "with_scope and filters for Rails 1.1 (scoped_access plugin)"

2008 Jun 24
0
scoped_access plugin and 2.0
Hi It would seem that the scoped_access plugin from http://wota.jp/svn/rails/plugins/branches/stable/scoped_access is incompatible with Rails 2.0.2. /home/httpd/rails/demoone/vendor/plugins/scoped_access/init.rb:18:in `alias_method'' undefined method `prepare_application'' for class `Class'' ( NameError ) from
2006 Jun 28
2
[PATCH] Bug fixes and additions to scoped_access
I found that scoped_access does not re-evaluate the filters on every run. If you are filtering access based on parameters, this can be bad. The scope is set on the first request and then further requests use the last generated scoping. The initial part of ScopedAccess::Filter#before looks like this: @scoping = controller.instance_eval(@scoping.to_s) if @scoping.is_a?(Symbol) This makes
2006 Apr 01
1
STI with_scope on parent - bug or feature?
Hi, It seems that setting a with_scope on the parent class doesn''t do anything MyClass.with_scope(:find=>{:conditions=> ["somecol = ?", ''val'']}) do @ext_pages, @ext_rows = paginate :my_extended_class, { :per_page => 13 } end # this doesn''t generate WHERE somecol=''val'' In order for scope to work you have to call
2006 Jul 23
0
[PATCH] (+tests) with_scope :order doesn''t work with included associations
(I''ve had this patch lying around for a couple of weeks, waiting for Trac to come back up. noradio''s already had a look at it on IRC. What''s the best way to submit patches while Trac is down?) with_scope doesn''t support :order in the presence of :include. For example: {{{ # We''re testing the interaction between :order, :include, and
2006 Apr 03
0
with_scope used in a has_many :through model
Hi there, I have something like the following: class Person < AR:B ... ... has_many :votes has_many :chosen_answers, :through => :votes, :source => :answer, :select => ''DISTINCT answers.*'' do def my_answers(whodunnit) chosen_answers.with_scope(:find => { :conditions => [ "votes.created_by=?", whodunnit ] }) do chosen_answers.find :all
2006 Mar 02
0
EdgeRails with_scope and :select
>From what i can gather the with_scope feature doesn''t allow you to specify which columns get selected. It appears to default to "*". So if i specify something like: Question.with_scope( :find => { :from => "questions q, answers a", :conditions => "q.owner = a.owner AND a.owner=1" }) do ... end I''ll generate SQL like: SELECT *
2013 Apr 24
2
[LLVMdev] Questions about attaching DWARF source code debugging information to generated LLVM-IR.
I upgraded my versions of llvm, clang and compiler-rt to the top-of-tree versions from last night (r180162, April 24). I recompiled debug versions of llvm, clang and my code. I then regenerated my test case and the results were the same - I can list lines of dwarf1.lsp in lldb but I can't set break-points or do anything else (what else should I be able to do?). The updated file that
2013 Apr 24
0
[LLVMdev] Questions about attaching DWARF source code debugging information to generated LLVM-IR.
One other thing that may or may not illuminate the situation. When I run under gdb (on OS X 10.8.3 this is an ancient version of gdb 6.3.5 - but it works with clang compiled C++ code) I get the following error when I try to list a line in dwarf1.lsp: Dwarf Error: Cannot handle DW_FORM_<unknown> in DWARF reader [in module /Users/meister/Development/cando/src/tests/core/dwarf1.bundle] (gdb)
2006 Jun 15
1
Unicode hacks - problem
I have updated to latest Unicode hacks plugin and now it fails when rails are started .... C:\ruby_projects\radrails\workspace\auth_template>mongrel_rails start ** Starting Mongrel in development mode at 0.0.0.0:3000 ** Starting Rails in environment development ... C:/ruby_projects/radrails/workspace/auth_template/config/../vendor/plugins/scoped_access/init.rb:17:in
2006 Jun 26
0
with_scope with new
Why does with_scope work with .create, .find, but not with .new? It breaks all scaffolded code :( -- Posted via http://www.ruby-forum.com/.
2010 Jan 27
1
around_filter and with_scope
i got two controller (with restful actions) where my code is quite ugly and not very dry. every action looks quite like this: if @logged_user.has_role?("admin") User.find(params[:id) else @logged_user.group.user.find(params[:id]) this is a security check that enforce a simple spec: normal user should read/write information only about their group''s users, but
2006 Nov 01
17
So how can I rewrite my app without using with_scope?
So, I hear that with_scope is going to be deprecated. Which is a bit of a shame, given the stuff I''ve been writing recently. I have a CMS with multiple clients. A ''client'' is essentially a company, with multiple users. Content on the site belongs to a client - content could be messages, images, schedules, etc etc. People belonging to one client should not be able
2006 Jul 23
4
Anything like with_scope for ActionController?
There are areas of my application that "want" to use a url structure like domain/<human_readable_param>/<Module>/<Controller>/<Action>/<Id> Please note that the human readable parameter I need to inject is NOT related to the <id> being used by the action/controller pair. It''s identifying a container object whose contains are operated
2007 Oct 09
3
igraph and plotting connected components
Hello there, I am using the igraph package to build graphs from my data. If I plot a graph though, it's not easy for me to see what's going on. Does anybody know how to rearrange a graph to get a plot without too many crossing lines? Maybe other packages? Thanks a lot in advance for any pointers, -- D --------------------------------- [[alternative
2007 Oct 18
9
with_scope issue
I have the following code: class User < ActiveRecord::Base has_many :requests do def find_active(options = {}) with_scope :find => { :conditions => ["requests.active = ?", true] } do find(:all, options) end end end end Executing user.requests.find_active results in the following SQL: SELECT * FROM requests WHERE (( requests.user_id = 10 ) AND (
2004 Aug 27
3
Digit detect during a Background() inside a Macro wrongly jumps b ack to the calling context to match digits?
Consider this dialplan fragment, where the call is being dialed into [macro-process-routing] over an iax2 channel from another (same build) Asterisk server: [macro-process-routing] ; This is the entrypoint of the debug call but is also refered to by Macro(process-routing) elsewhere in the dialplan ; XXX-NNN-6800 exten => _6800,1,Macro(6800-interceptor) ; This is matched when 8 is
2016 Sep 02
2
call_once and TSan
> On 2 Sep 2016, at 12:11, Dmitry Vyukov <dvyukov at google.com> wrote: > > On Fri, Sep 2, 2016 at 12:09 PM, Kuba Brecka <kuba.brecka at gmail.com> wrote: >> >>> On 2 Sep 2016, at 11:18, Dmitry Vyukov via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>> >>> On Thu, Sep 1, 2016 at 2:30 PM, Kuba Brecka <kuba.brecka at gmail.com>
2016 Sep 02
2
call_once and TSan
> On 2 Sep 2016, at 11:18, Dmitry Vyukov via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On Thu, Sep 1, 2016 at 2:30 PM, Kuba Brecka <kuba.brecka at gmail.com> wrote: >> Hi, >> >> I'm trying to write a TSan interceptor for the C++11 call_once function. There are currently false positive reports, because the inner __call_once function is located in
2016 Sep 02
2
call_once and TSan
Same problem exists, thread A can still be within REAL(call_once), but after it ran user code and set the flag to ~0. Roughly, call_once does: __call_once(flag, arg, func) { mutex_lock(mut); if (flag == BEING_INITIALIZED) { wait } else if (flag == NOT_INITIALIZED_AT_ALL) { flag = BEING_INITIALIZED; mutex_unlock(mut); func(arg); // <=== user code callback
2016 Sep 01
2
call_once and TSan
Hi, I'm trying to write a TSan interceptor for the C++11 call_once function. There are currently false positive reports, because the inner __call_once function is located in the (non-instrumented) libcxx library, and on macOS we can't expect the users to build their own instrumented libcxx. TSan already supports pthread_once and dispatch_once by having interceptors that re-implement the