Displaying 20 results from an estimated 10000 matches similar to: "Looks like an error in docs for ActionDispatch::Routing::Mapper::Resources"
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
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
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 Jun 12
0
[PATCH] ActionDispatch MemCacheStore violates encapsulation principle
When pass :cache param to ActionDispatch::Session::MemCacheStore, it should
be removed from options, otherwise it remains "published". This violates the
OOP encapsulation principle.
I created a LH ticket with a patch
http://bit.ly/cGDaWs
Luca
--
lucaguidi.com
twitter.com/jodosha
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Aug 30
16
<b> tag in HTML 5 (was Re: Re: assert_select for <p><b>text</b>value</p>)
On 30 August 2010 15:47, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
> Colin Law wrote:
>> I have the following html
>> <p><b>text</b>value</p>
>> I can use
>> assert_select "p>b", "text"
>> to check the text portion, and
>> assert_select "p", "value"
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
2010 Aug 27
6
assert_select for <p><b>text</b>value</p>
I have the following html
<p><b>text</b>value</p>
I can use
assert_select "p>b", "text"
to check the text portion, and
assert_select "p", "value"
to check that the value appears in a <p>. I cannot work out how to
check that the two are in the same <p>. I have used assert_select for
much more complex tasks but my mind
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
2012 May 13
1
is assert_select_rjs deprecated in Rails 3.1 ?
I have seen it in 3.0.9 doc (
http://apidock.com/rails/v3.0.9/ActionDispatch/Assertions/SelectorAssertions/assert_select_rjs
)
but it''s not mentioned in the latest guide (
http://guides.rubyonrails.org/testing.html#integration-testing-examples)
if deprecated how can I check the view from an Ajax call
( assert_match + gsub could work ? ... )
am I missing any doc ?
xhr :get, :change_area,
2010 Sep 21
7
Ajax CSRF in Rails3
I''m using rails3. It does not seem to check the authenticity_token
when doing a POST using Ajax. I traced this to:
module ActionDispatch
class Request < Rack::Request
.....
def forgery_whitelisted?
get? || xhr? || content_mime_type.nil? || !
content_mime_type.verify_request?
end
end
so you don''t check if its a get? or a xhr? (ie ajax request). Is this
correct?
--
2011 Jul 12
0
[PATCH] Don't mention /dev/mapper in docs for vg-activate{, -all} commands.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
-------------- next part --------------
>From 11bf86e24d2d4c70a8e599deca8528edc93f3a17 Mon Sep 17 00:00:00 2001
From: "Richard W.M.
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field
= form_for (Clip.new), :html => {:multipart => true} , :remote =>
true , do |f|
= f.hidden_field :user_id, {:value => current_user.id}
= f.text_field :name
= f.text_area :description
= f.file_field :image
= f.submit I18n.t(:add)
generating the html code
<form accept-charset="UTF-8"
2012 Jun 08
1
[Rails 3.2.5] Rails: unit test fixture_path : fixture_file_upload cannot find the file ...
I am trying to perform a test unit, using FactoryGirl
include ActionDispatch::TestProcess
FactoryGirl.define do
factory :article do
.......
photo { fixture_file_upload ''/files/test.jpg'', ''image/jpg'' }
end
end
IN mt test_helper.rb I defined the fixture_path
def fixture_path
File.dirname(__FILE__) + "/fixtures/" #
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
2010 Dec 17
1
flash[;notice] not display after redirection
I read all previous posts about the same subject in Devise group but
couldn''t find any answer, so iy may not be related to Devise , so
I debugged it ..
.
class Users::RegistrationsController <
Devise::RegistrationsController
..
# POST /resource/sign_up
def create
build_resource
if resource.save
if resource.active?
set_flash_message :notice, :signed_up
2010 Aug 12
3
script/server problem/...
root@essc-openvpn:/websites/teambox.mydomain.com/teambox# sudo script/
server -e development
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:
132: warning: Insecure world writable dir /usr/bin in PATH, mode
040777
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
/usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 6, col
2:
2011 Feb 28
4
best_standards_support
File ./lib/rails/generators/rails/app/templates/config/environments/development.rb.tt:
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
File ./lib/rails/application.rb:
middleware.use ::ActionDispatch::BestStandardsSupport,
config.action_dispatch.best_standards_support if
config.action_dispatch.best_standards_support
What''s
2013 Jun 22
4
ActiveRecord::Base.transaction - SystemStackError - stack level too deep:
Im having an issue that seems to only happen when trying to use a
transaction. Ive used transactions many times in the past and Im at a loss
as to why im getting the stack level too deep problem.
SystemStackError - stack level too deep:
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:70:in `''
I have a StackOveflow with more detail -