similar to: data normalize extension

Displaying 20 results from an estimated 50000 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 =
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
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
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
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
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
2010 Aug 06
4
Object/Record foreign key IDs set to zero
Hello, Hope no one minds me just jumping in here with a question. I''m completely new to Ruby on Rails. I''ve been reading "Simply Rails 2", and following their examples. I reached a point where the unit tests were unexpectedly failing. Upon investigation, I discovered that when Rails loads the fixtures, the foreign keys aren''t being populated with the foreign
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
2011 Dec 26
1
Learning Ruby on Rails 3.1 - deployment - Error (cs.jpg isn't precompiled)
Hi guys, I''ve followed the Agile Web Development with Rails book and I''m up to deployment. I started a Ubuntu 10.1 LTS server on Amazon EC2 for testing, got Apache 2, mysql, rvm, ruby 1.9.2, rails 3.1 and phusion passenger up and running as per the book. When I come to running the actual site, it says "We''re sorry, but something went wrong." In
2013 Sep 15
1
Why does Rails convert scopes to downcase
I found a strange behavior in Rails 4 with scopes when I use postgres. I have a Object with saleStartDate and saleEndDate attributes. scope :active, -> { where(isActivate: true) } > scope :activeDate, -> { active.where("? BETWEEN saleStartDate AND > saleEndDate", Date.today)} When I use sqlite, all works when I want to get the object with the activeDate scope. When
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
2010 Dec 20
11
rails code to sql
Is there a relatively easy way to do this code in sql? @categories=Category.all.reject{|n| n.blank?}.sort{|a,b| a.name <=>b.name}.collect{|t| [t.name,t.name.downcase.gsub('' '',''_'')]} -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to