Displaying 20 results from an estimated 1400 matches similar to: "[PATCH] ActionDispatch MemCacheStore violates encapsulation principle"
2006 Mar 07
0
MemCacheStore; memcached-problem on freeze_edge (export version 3811)
Heya,
I got the following problem on an app using memcahed.
Using the latest stable release from gem install rails and lighttpd
all is fine.
If I do a rake freeze_edge as I want to take advantage of the latest fun,
I get the following error-message at startup time.
rails@lists.rubyonrails.org
$ ruby script/process/respawn
.....
...
2010 Apr 22
7
Making ActiveSupport::Cache consistent
Lighthouse ticket: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4452
I have recently been working on some gems that utilize
ActiveSupport::Cache and ran into some issues with the different
implementations handling the same functionality differently. One of
the issues was that I couldn''t rely on expiring entries with
the :expires_in option. MemCacheStore takes this
2013 Mar 22
0
Should to_io be added to ActionDispatch::Http::UploadedFile?
In rest-client/rest-client#144<https://github.com/rest-client/rest-client/issues/144#issuecomment-14876580> we''re
trying to handle objects that behave like IO. Some have suggested that
respond_to?(:read) is a poor test of this and have suggested using
IO.try_covert(obj) instead. My counter example for this is
ActionDispatch::Http::UploadedFile. I''m wondering if there
2011 Jan 10
0
Can't use ActionDispatch::Request in Rails middleware because path_parameters get lost
Hi,
I just encountered a bit of an issue where we call request.params of
an ActionDispatch::Request inside a rack middleware right before a
Rails 3.0.3 app. The issue is that the path_parameters never appear
in the parameters hash if you call request.params before the rails
app.
It seems that that the requests.params method memoizes itself in
"action_dispatch.request.parameters"
2010 Nov 19
1
Help: delegated association 'App' returning ActionDispatch::Integration::Session instead
class Foo < ActiveRecord::Base
has_one :bar
delegate :app, :to => :bar
end
class Bar < ActiveRecord::Base
belongs_to :app
def self.attribute_column_names
return @@attr_columns if defined?(@@attr_columns)
readers = content_columns.map { |n| n.name.intern } -
[:created_at,:updated_at]
@@attr_columns ||= readers.map { |k| [k, "#{k}=".to_sym] }.flatten
end
2011 Jul 31
2
Looks like an error in docs for ActionDispatch::Routing::Mapper::Resources
Please take a look at this page:
http://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Resources.html#method-i-resource
It reads:
:path
Set a path prefix for this resource.
resources :posts, :path => "admin"
All actions for this resource will now be at /admin/posts.
For me (Rails 3.0.9) it routes to just "/admin", not "/admin/posts".
2008 Sep 11
1
cached_models
Hi all,
Yesterday I released a new Rails plugin: cached_models.
It allows to transparently use the internal Rails cache mechanism in
your models, avoiding to write code for expiring policies.
Example
class Project < ActiveRecord::Base
has_many :developers, :cached => true
end
class Developer < ActiveRecord::Base
belongs_to :project, :cached => true
end
# Automatic cache, all
2010 May 31
1
Flash not deleting with Redis/Memcache store
I''m a recent convert to Rails and I''m working on a new project using Rails 2.3 (I''ll probably upgrade at some point when Rails 3 is in production and had a chance to bake the .0 bugs out). I''m going to use Redis anyway for caching important data, so I thought I''d use the redis-store:
http://github.com/jodosha/redis-store
But it appears the flash
2010 Dec 15
2
Error reverse engineering MySQL with RMRE
Hi
I am been trying in vain to auto-gen models by reverse-engineering
mysql using RMRE. It complains mysql2 gem missing but as seen in my
Rails environment below, it is there.
Here''s my Rails environment and RMRE error. Experts... please help!
Thanks a ton in advance!!
===
Ruby version 1.9.2 (x86_64-linux)
RubyGems version 1.3.7
Rack version 1.2
Rails version 3.0.3
Active Record
2012 Mar 04
4
How to retrieve a FileBlob from 'ActionDispatch::Http::UploadedFile' instance?
I have used ''remotipart'' gem to upload files asynchronously to server side.
The instance passed to the server side is of ''UploadedFile'' .
The Rails API mentions all the methods( like read(), open() ) and
attributes for the class, however I am not sure how to retrieve the File
and store it on the database. The documentation hardly says anything.
Googling
2013 Mar 26
2
Using rack.hijack with ActionController::Live
Pinging @tenderlove
Some questions on how best to move forward with this:
1.) AC::Live is making use of the stream object on
ActionDispatch::Response. Should the rack.hijack_io object be used instead
of this in AC::Live or should ActionDispatch::Response be changed to use
rack.hijack_io?
2.) What do you think about changing AC::Live to work with adapters? I
suspect the primary use case for
2005 Dec 25
1
How to use mem_cache_store?
Hi,
I''m trying to use mem_cache_store for sessions. I have installed the
server and the gem and have added the following to my
config/environment.rb:
>>>>>>>>>>>>>>>>>>>>>>>>>
memcache_options = {
:c_threshold => 10_000,
:compression => true,
:debug => false,
:namespace =>
2011 Jul 14
0
Converting an Uploaded File to a string while maintaining binary data
Ok so it boils down to this I uploaded a picture into a
ActionDispatch::Http::UploadedFile and want to convert it to a string
before I send it off google storage. When I do this it complains about
having null characters.
I had the same problem when I was experimenting with files from my hard
drive with the same function. I was able to do it with:
File.open( ''filename'',
2013 May 13
0
Middleware example from Railscast #151 doesn't work as expected. Need help.
My middleware class "ResponseTimer" doesn''t intercept a request. I don''t
know why (the example is from here
http://railscasts.com/episodes/151-rack-middleware?view=asciicast; I
changed my one a little for Rails 3.2.13 version, the original is for
Rails
2.x).
So I did as follows:
## in \lib\response_timer.rb
## this is the class of my custom middleware:
class
2013 Sep 30
0
TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
I''m currently new to Rails and Ruby and I''m trying to learn from my
mistakes, this time I''m trying to upload 2 files from a form for later
processing, however, after I hit the "Submit" button. I keep getting this
error:
TypeError in UploadFilesController#create
app/controllers/upload_files_controller.rb:28:in `new''
2008 Feb 20
0
#dom_id should use AR#to_param instead of AR#id
Hi,
I have just commited a patch for ActionController''s #dom_id, it should
iternally use AR#to_param instead of AR#id, because #to_param is used
for routing representation of an ActiveRecord inside ActionPack.
You can found the ticket here: http://dev.rubyonrails.org/ticket/11179.
Luca.
--
blog: www.lucaguidi.com
--~--~---------~--~----~------------~-------~--~----~
You received
2012 Jul 23
4
uninitialized constant ActionController::Flash::FlashHash [NameError])
My application, a very simple general ledger, that worked very well until
June 26 does not work any longer. It is used under Ubuntu 12.04 and I
believe there was a Ruby update after that.
What happens?
When I try to start the appIication I get the following output in my web
browser:
ActionDispatch::Session::SessionRestoreError
Session contains objects whose class definition isn''t
2010 Nov 17
3
How to use request helpers outside of controller specs?
I asked this questions on some other places before, but have found no
solution yet. I''d like to include the request helper (from
ActionDispatch::Integration::RequestHelpers, like post and xhr
methods) also in some specs outside of my controller specs. The
problem is that these request helpers are only included in spec/
controller and when a controller is described.
What do I have to
2006 Jan 30
0
cached_model-1.0.1 ActiveRecords + memcache
The new version of cached_model features bug fixes and tests!
Bugs fixed:
Updating a model no longer stores associations into the cache. This
could cause strange, hard-to-debug bugs when an invalid set of
assocations was retrieved along with a cached model.
Reloading a model refreshes the cache.
When CachedModel::find can''t understand query params and a single
result is
2008 Nov 25
0
Sanitizing the New Session Key Format
Facebook''s new session format contains periods and underscores which
appear to be breaking mem_cache_store. To get my app working again, I
appended the following code to the end of environment.rb
class CGI
class Session
class MemCacheStore
def check_id(id) #:nodoc:#
id = id.gsub(''-'', '''').gsub(''.'',