Displaying 20 results from an estimated 600 matches similar to: "SerializationTypeMismatch in Production Mode"
2006 Mar 15
7
Populating text_tag with serialized data
I am using a serialized attribute in one of my models The serialized data is
in the form of an array. I want to have a text_tag for each element
contained in my serialized attribute. How would I construct the text_tag?
My model name is ''questions''. The serialized attribute is "answers"
So I might have:
<% form tag %>
<% text_tag ''question'',
2010 Dec 08
0
ActiveRecord serialize field and SerializationTypeMismatch
Hello.
In one of my ActiveRecord models I specified a a serialize field:
serialize :settings MyModelSettings
If I understand the documentation correctly this restricts settings to
the class MyModelSettings. The problem is that this is so restrictive
that I even don''t know how to initialize the field.
MyModel.new
or even
MyModel.new(:settings => MyModelSettings)
everything I do
2009 May 18
0
ActiveRecord SerializationTypeMismatch MySQL SQLite
I was having this error in Development but not in Test:
ActiveRecord::SerializationTypeMismatch: cambiable_attributes was
supposed to be a Hash, but was a String
Which was the problem?
I was using MySQL in Development and SQLite3 in Test. Field
''cambiable_attributes'' was type String in the DB schema and had to be
type Text.
I changed the data type to Text and it worked well in
2008 Nov 05
3
Problems w/ before_filter getting ignored
Hello,
I''m setting up an authentication module that will be called from
application.rb. I want to save a rrequest.request_uri into a
session to be used as a place holder that
will take users back to the page they were on before they logged in.
I''m trying to call the store_location method for all methods EXCEPT
login by putting login in an except before filter.
For some
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
Having implemented a GC for HLVM, I am now turning my attention to
implementing a GC that supports parallelism. To do this, I would like to use
atomic instructions as well as mutexes. What is the status of LLVM's atomic
instrinsics (e.g. CAS)? Is anyone using them in real projects?
I realised that an obvious test would be to compile some simple example
programs with llvm-g++ instead of
2007 Nov 16
3
Route Information
Is there a method to return a hash of the route configuration based on
a path?
For example:
magic_method(''/my_controller/my_action/my_id'')
=>
{:controller => ''my_controller'', :action => ''my_action'', :id =>
''my_id''}
Thanks!
Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message
2006 Feb 14
8
Best Practices For back/cancel/return button
Are there any best practices for implementing a back/cancel/return
button... even when the page you want to return people too is 2 pages
back (when people submit form and then want to return)?
Thanks :-)
Your Friend,
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
2006 May 25
1
Question regarding reading arrayvision files in limma
Hi Everyone,
I have been trying to read some Arrayvision files( 2 channel cDNA) and
am having some
problem. My code is :
setwd('C:/work/data/limma/ndd1');
files <- c('ndd1_1.txt','ndd1_2.txt','ndd1_3.txt');
RG=read.maimages(files,"arrayvision",sep="\t");
#Normalisation
MA=normalizeWithinArrays(RG);
#plotPrintTipLoess(MA);
#Fit Linear
2008 Mar 29
3
primary key?
can you use 2 pirmary keys.
the standard user_id key exists but i would also like to use another
key for my links. i am not sure how to implement this. also i don''t
want any auto incrementing of this second primary key that i would
like to use for my relationships.
if there is a good db, model, relationship tutorial out there i would
love to know about it.
2006 Jan 30
10
How do I get the the full URL of an incoming request
Hey,
Is is possible to get the full URL
(''http://www.sender-domain.com/links/list.html'')
from where a user was sent to my site
(www.my-domain.com/controller/action) e.g. by clicking on a link? (I
read about something called a ''request'' object, I don''t know what it is
or does, is that what I''m looking for?
I''m very new to Rails
2009 Aug 27
2
Setting @request.env["HTTP_REFERER"] in an integration test
Hi.
I would like to set @request.env["HTTP_REFERER"] in an integration
test, but due to its nature, I would naturally set this value to the
previousle request url. How do I do that.
Thanks.
Jarl
2007 Feb 22
4
Modifying Apache Conf To Block Leachers
Howdy,
I''m using Apache 2.2 + Mongrel with great success, using the sample
configs from the Mongrel site.
We have some MP3s on the site and recently someone has been stealing
them and basically leaching them from the site, linking to them from
an off-site location.
I''ve been trying to modify my Apache conf to check the referrer and
adjust accordingly as below but no
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login
test from cucumber features. The feature statement is:
Given the user is not logged in
The step definition for this is confounding me. In the
application_controller the authlogic tutorial recommends the following:
private
def require_user
unless current_user
store_location
flash[:notice] =
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello
I have a rails 3 app and I am trying to implement the redirect back
action at access denied for cancan.
If I try this in my application_controller:
rescue_from CanCan::AccessDenied do |exception|
redirect_to :back
end
It gives the following error:
No HTTP_REFERER was set in the request to this action, so
redirect_to :back could not be called successfully. If this is a test,
make sure
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi,
I just installed Rails 2.0.2
[root@mymachine easyx]# ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
[root@mymachine easyrx]# gem install rails --include-dependencies
Need to update 16 gems from http://gems.rubyforge.org
................
complete
Successfully installed rails-2.0.2
[root@remandev easyrx]#
But I''m getting this error in my restful_authentication
2006 Aug 05
3
Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection?
Hey guys,
Ok, basically I coded a ruby on rails CMS to manage a bunch of media
files. I am finding that a lot of people are "hot linking" to these
media files and would like to prevent this to save bandwidth. Usually
in the past, it hasn''t been a problem, I would add something like the
following to my .htaccess file
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
2007 Feb 22
1
HTTP_REFERER support?
Hello,
we want to read the referer URL from the HTTP headers, in order to be able
to track where someone is coming from, in a Rails application.
As I can see in the source, Mongrel doesn''t even parse the HTTP_REFERER
field from HTTP requests. This would make a useful feature, I guess.
Apart from that, Mongrel is (IMHO) simply the best solution for deploying
Rails - keep on going!
2006 Jan 29
3
SHLG and lib dir
Slowly figuring out how to get my SaltedHashLoginGenerator stuff working. The wiki page
says to put "before_filter :login_required" in the user (my "user" is "member") controller
or in ApplicationController. However, wherever I put it I get NoMethodError.
The rest of the SHLG stuff seems to be working... or at least I could get to the signup
page, register, and
2006 Apr 18
6
Best Practice for Returning to Calling Page?
I have a partial, it''s a shopping cart display, it''s designed to appear
on several different pages of my site.
One of the buttons on the shopping cart empties the cart, and then I
want the calling page to redisplay.
In other words, the cart controller needs to return the visitor to the
same page -- however since the cart could appear on any given page, this
has to be
2005 Mar 07
2
Login generator question
Hello
I''m using the login generator on my application, and I found a problem
with it.
My application is a rack inventory thing, which shows a rack with
machines and KVMs and you can click on a rack item to show/edit/destroy
it. The edit and destroy actions are protected by the login generator.
Now say a user clicks on "destroy" for some machine. He''ll be shown the