Displaying 20 results from an estimated 40000 matches similar to: "data normalize extension"
2011 Jun 19
1
before before_validation callback
Hi,
I was looking around a bit and couldn''t find any callbacks that
executed before before_validation
The current problem with using before_validation is that it won''t fire
if I''m not using validations with #save(:validate => false) - which
makes sense. Before_save won''t suffice because I want these callbacks
to fire before validation on the occasions that
2010 Nov 10
0
Problem with case statement and mb_chars in Ruby-1.9.2
RoR-3.0.1
I have this case statement:
case n.hll_normalize
when "common name"
@my_correspondent.correspondent_common_name = s
when "legal name"
. . .
else
raise ArgumentError, "#{n} attribute is not provided for."
end
hll_normalize is defined as:
def hll_normalise
strip.squeeze(" ").mb_chars.downcase
end
I
2006 Nov 28
0
tzinfo_timezone/tzinfo can't modify frozen object
Hi.
I get the following error off and on in my app. I''m running latest
EdgeRails in development mode, and use the tzinfo_timezone plugin and
the tzinfo 0.3.3 gem.
I''ve checked line 210 in tzinfo_timezone.rb but cannot relate that to
an object modification in tzinfo. Any tips much appreciated.
ActionView::TemplateError (can''t modify frozen object) on line #29 of
2012 Dec 12
0
Sanitize for style attributes
It''s really confusing to decide whether sanitize will help avoid XSS in
case when :attributes => %w( style )
on stackoverflow, people say that it is not safe, yet the examples they
give such as
style="background-image: url(javascript:[code]);"
is being filtered out using sanitize and all that is left is style=""
is there a way to get a definite answer if
2012 Dec 08
0
Security - How to sanizitize JSON?
Hi, I''m on Rails 3.2.8 and one of my apps sends some json to create DB
objects. What''s the best way to sanitize json?
I found this post claiming that for json we need to escape manually
since json_escape is broken:
http://blog.bigbinary.com/2012/05/10/xss-and-rails.html
I tried using the sanitize gem (https://github.com/rgrove/sanitize/) but
when using it on a json string it
2012 Sep 20
4
access controller's object attributes in view page
Hi,
I am new to ROR and learning it. In my controller I have an admins
record and I am passing that admin object to the admin''s view page to
get the name of the admin. But when I try to access the name it is
showing error as "undefined method `name'' for :current_admin:Symbol"..
Please help..
Please find my code below
Sessions Controller
def create
2011 Jun 26
1
ActionView::Template::Error (Cannot modify SafeBuffer in place):
Hello,
Trying to upgrade an app that was running fine in 3.0.3 to 3.0.9 and
while everything works well, I get this error:
ActionView::Template::Error (Cannot modify SafeBuffer in place):
When passing a string to this function (in application_helper.rb)
through a simple: <%= format_me(article[shortdesc])%>
def format_me(text, html_options={}, options={})
text =
2007 Feb 28
3
[ win32utils-Bugs-8942 ] several typo in windows-pr.
Bugs item #8942, was opened at 2007-02-28 23:59
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=8942&group_id=85
Category: windows-pr
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: Katsuyuki MIYAMUKO (miyamuko)
Assigned to: Nobody (None)
Summary: several typo in windows-pr.
Initial Comment:
I found typo in windows-pr.
Attached
2013 Jul 18
2
Normalize dates taht are entered in more then one way.
Hi all,
I''m looking for a function, gem, etc. that will help to unify dates as they
come in different formats. If the date comes in
(1/2/2012,2012-01-02,01-02-2012,20120102,01022012, etc.) it would be nice
to have it come out 2012-01-02. I''ve searched for a few days and only find
ways to convert this format to that format. I might be using the wrong
search terms and this
2019 Sep 20
0
Bug] Sieve vacation :addresses match only,>, case-sensitive?
Hi,
>> I never saw any mail system in which the local Part ist Case sensitive!
>
> Every Unix/Linux system (I?d say that represents the majority of mail systems) has a case sensitive local part. Most mail admins have set their systems up to normalize all users on lowercase names, but that is not and has not always been the case.
at least in every large installation LDAP User
2013 Apr 12
4
rails named scopes and sql injection
HI guys,
I just came through an example on code of the place I work for that said
something like this could be vulnerable to sql injection attacks:
scope :with_name, lambda { |name| where("LOWER(name) LIKE ?",
name.downcase) }
I wonder if this is true. My thought is that rails should escape this and
that anything that tried to do something different would fail on the
translation
2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
I have searched a lot for a solution, but I could not find it! I am trying
to make a rails application after watching Michael Hartl''s tutorial and
when i fill data manually and submit it nothing happens and nothing records
in the Mailers table and I am facing the following error:
Failures:
1) Mailer pages mail us with valid information should send a mail
Failure/Error: expect
2009 Oct 13
1
loofah 0.3.1 Released
loofah version 0.3.1 has been released!
* <http://loofah.rubyforge.org>
* <http://rubyforge.org/projects/loofah>
* <http://github.com/flavorjones/loofah>
Loofah is an HTML sanitizer. It will always fix broken markup, but
can also sanitize unsafe tags in a few different ways, and transform
the markup for storage or display.
It''s built on top of Nokogiri and libxml2, so
2013 May 19
5
update_attributes() for a single column
I was just faced with a strange ROLLBACK exception when attempting to
execute this code:
$ rails console
user = User.first
User Load (1.1ms) SELECT "users".* FROM "users" ORDER BY
"users"."id" ASC LIMIT 1
=> #<User id: 1, name: "Michael Hartl", email: "foo-+RB1Aph5k6s@public.gmane.org",
created_at: "2013-05-12
2011 Jan 23
2
RedCloth 4.1.1 vs. 4.2.3 - weird behaviour with notextile
For a community project I aim to combine RedCloth and Coderay and on doing
this, I might have found an issue with RedCloth.
I pushed a demo to Github:
https://github.com/markusproske/redcloth_coderay_demo
The index (http://localhost:3000/) demonstrates the issue.
In brief:
A page consist of textile. The textile contains @@@ruby somecode @@@
The textile is first feed into Coderay via a helper
2003 Jan 18
2
Latest release of --files-from patch
I've worked up a new release of my --files-from patch. It has the
following changes from the last release:
New Changes:
============
- The -R option is now on by default when --files-from has been
specified. The user can specify --no-relative to turn this off.
- The -a (--archive) option does not imply -r when --files-from was
specified. The user can still specify it manually,
2011 Nov 21
1
uninitialized constant Sass::Script::Functions::EvaluationContext
Hi, after deploying a bunch of modifications to my web app... I get the
error attached trying to load the page (see attached file). This is my
environment.rb file:
config.gem ''warden''
config.gem ''devise'', "~> 1.0.9"
config.gem "role_model"
config.gem "formtastic", :version => "~> 0.9.10"
config.gem
2013 May 21
0
Respect for Rails 0.1.0 is out!
Hi,
Just to let you know that I have just released a new Rails plug-in called:
Respect for Rails.
Never feel the need to document your REST API while still developing it
because a colleague of yours is making a mobile app client at the same
time? If yes, then this gem is for you.
You:
- describe the structure of your server requests/responses using the
compact DSL provided.
- mount the engine
2006 Jan 09
3
Pagination :conditions not working - MySQL v. PostgreSQL, Rails abstraction v. embedded SQL
Hi everyone,
I have this code:
@person_pages, @people = paginate :person, :per_page => 20,
:conditions => [ "username LIKE ? OR first_name LIKE ? OR
last_name LIKE ? OR preferred_name LIKE ?",
"%" + params[:q].downcase + "%",
"%" + params[:q].downcase + "%",
2006 Oct 30
2
file_column uppercase extension problem
i''m using file_column 0.3.1 with rails 1.1.6, ruby 1.8.4, on winXP, and
i have this problem:
when I try to upload in my web application an image using file_column
plugin, if the extension of the image contains at least 1 uppercase
(e.g. myImage.jpG), I get this error:
No such file or directory -
./public/model/picture/tmp/1162229227.753000.516/myImage.JPG or