I Happiness to share
You know when users gotta insert a lot of records into the DB, it is cool if the programmer always set the first field of a Form with focus! Or else they could get really annoyed..
First of all, this is a Rails solution but can be done in any [...]
Arquivo da categoria ‘Rails’
Satisfaction II – javascript field focus
Publicado em Desenvolvimento, Rails, js, etiquetado focus, form, js, rails em 2009/04/23 | Deixar um comentário »
Helper Plural Rails
Publicado em Desenvolvimento, Rails, etiquetado actionview, helper, rails em 2009/03/13 | 2 Comentários »
Foi exatamente esta minha busca: ” helper plural rails “, pq eu estava desconfiado que deveria existir um helper pra isso, pois em Rails tudo deve ser feito em uma linha
Referencia: ActionView
pluralize(2, ‘Item’)
=> “2 Itens”
Aquele negócio preguiçoso de “Foram encontrada(s) 1 corrência(s)” estão com os dias contados!
Atenção, não sei dizer como [...]
Damm hidden rails 2. Secret!
Publicado em Desenvolvimento, Rails, etiquetado rails, secret, token em 2009/01/23 | Deixar um comentário »
I’m soooooo fucking pissed right now.. even thought its probably my fault by not looking at Rails Docs first I just didn´t know where to search at/for! As I would have trouble explaining myself at any language here it goes..
Rails 2.x secret is acessed by the method form_authenticity_token ! That´s if you use protect_from_forgery
This protect_from_forgery [...]
Problem installing gem rails 2.2
Publicado em Desenvolvimento, Rails, etiquetado 2.2, gem, rails em 2008/12/11 | 1 Comentário »
Quick post about installing Rails 2.2
I don´t know if it is related to Vista, or Windows or in general but, before installing you have to run: gem update –system and then gem install rails (–include-dependencies is still very friendly =)
If you had any issues with MySQL this guy found a solution (Portuguese): http://leonardofaria.net/2008/09/10/edge-rails-no-windows-vista/ It [...]
Gerenciador de imagens em Rails para TinyMCE e FCKEditor
Publicado em Desenvolvimento, Rails, etiquetado FCKEditor, rails, rich-text, TinyMCE em 2008/12/04 | Deixar um comentário »
Problema: Estou usando TyneMCE ou FCKEditor em minha aplicação Rails, quero um gerenciador de imagens pra ontem!
Problem: I´m using TyneMCE or FCKEditor in my Rails app and the File Mananger does not work ! I need this due yesterday!!
First Step: Use a plugin to insert this Rich-Text editors in Rails may prove to be a [...]
Mensagens legíveis de validação em rails
Publicado em Rails, etiquetado default field, mensagem, nome campo, rails, validacao em 2008/09/10 | 1 Comentário »
Estava sofrendo pela total ausência de internacionalização do Rails que supostamente vai ser corrigida na próxima versão (Rails 2.2) but como o meu projeto eh pra 1 semana não vai dar pra esperar, foi mau.. hehehehehehe
PROBLEMA: Tenho um field ou campo no meu BD que se chama filename e isto é fato imutavel e mesmo [...]
SQL for Birthday ou Aniversário
Publicado em Rails, sql, etiquetado rails, sql, date, birthday, aniversario, code em 2008/09/10 | Deixar um comentário »
This SQL works on MYSQL since 4.0 is for sure, I don’t know about the older versions !
PROBLEM: I want to display people whose birthday today up to 2 days from today! Preferentialy using only DB functions.
SOLUTION: This is way harder than looks like !!!! First because i don’t want to figure a solution that [...]
Simplest yet Rails authentication
Publicado em Desenvolvimento, Rails, etiquetado autenticação, authentication, before_filter, login, rails em 2008/08/13 | Deixar um comentário »
Authentication
On the WEB is particularly important to have a way of authentication for users, and the safety of transporting the data (web safety won´t be dealt with in this article, see: ssl, key public, private)
We will create here a basic system that contains an auth system, that is, there are different ways [...]
Firebird on Rails encoding accent right
Publicado em Desenvolvimento, Rails, etiquetado accent, acento, acentuação, firebird, none, rails em 2008/08/05 | 3 Comentários »
So today, I had a great achivment ! (A personal happyness )
The problem:
I HAVE to use a Rails App with Firebird DB 1.5 encoding: NONE and it has accents !
The deal : Portuguese is the language we Speak in Brazil ( Brasil), it has a lot of accents (acentos) so to get [...]
Rails Date Kit para formato do Brasil
Publicado em Rails, etiquetado ajuda, data, date, js, rails em 2008/07/25 | 1 Comentário »
ATUALIZAÇÃO: Não estou mais utilizando este sistema para datas em português, somente a validação!
Infelizmente a hora ainda não chegou para fazer meu post em inglês Quem sabe o próximo ?
Motivação: Rails date kit é uma ótima ferramenta para escolha de data (datepicker) e validação, MAS, não tem um bom formato aceito em portugues [...]