On Dec 17, 12:06 pm, Jay Chaun wrote:
> I am learning Rails 3 and need some help on Ajax part.
>
> I am trying to accomplish the following:
> There is a textarea on the page which has a length of letters
> constraint, say 100. Every time a symbol is typed there,a nearby label
> tells you how man
rajeevsharma86 wrote:
> Thanks Stephan Wehner ,
> but can you tell me a way to implement it
I'm really sorry, have no time at the moment.
What coverage are you looking for?
You can see some of the database at http://clocklist.com
"Add your friend or contact"-> City (no
ashu wrote:
> hi every one
> please tell me the recommended way to get country
> state city drop down list in rails
> any gem - plug-in tutorial
>
> thanks in advance.
I think it's fair to say the authority on such a list is
http://www.geonames.org
You can download the data fr
Stephan Wehner wrote:
> http://github.com/stephan-buckmaster/simple_twitter_post
>
> Uses Basic Authentication at the moment. Twitter says this will be
> discontinued in a few weeks (http://dev.twitter.com/pages/oauth_faq)
>
I updated a week ago to OAuth (using grackle)
Stephan
> Apologies, using select_tag "article[tag_list]" sufficiently fixes this
> problem.
>
> Thank you for your input.
Yes, that looks like the "right way". Except that the helper should be
able to generate that 'select_tag' with "f.select 'tag_list'"
Are you not allowing several tags, as tags are
Pale Horse wrote:
> Stephan Wehner wrote:
>> Pale Horse wrote:
>
> Nothing short of what should be there, nothing more:
>
> def new
> @article = Article.new
> end
>
> def create
> @article = Article.new(params[:article])
>
Pale Horse wrote:
> Stephan Wehner wrote:
>>
>> Could it be that your template should say
>>
>> <%= f.select "tags", ... %>
>>
>> and not
>>
>> <%= select_tag "tags", ... %>
>>
>>
>> Stepha
Could it be that your template should say
<%= f.select "tags", ... %>
and not
<%= select_tag "tags", ... %>
Stephan
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, se
Just uploaded version 0.1 of a Ruby on Rails plugin
"simple_twitter_post" to github:
* http://github.com/stephan-buckmaster/simple_twitter_post
Makes it easy to update the twitter status of a configurable account
with this interface:
p = SimpleTwitterPost::Base.new
p.post("Welcome our new m
On May 10, 2:58 pm, David Zhu wrote:
> If I did copy and paste my project folder into a flash drive, and then
> after the restore i paste it back on the harddrive, would it still
> work though? can i just run a rake db:migrate and then everything will
> get migrated? or no?
What's your database
On May 8, 1:24 pm, nirosh wrote:
> thanks for the reply. i have complete my rails app and hosted on
> hostmonster. but i dono how to enable the gzip on my app.i checked my
> hosted app with yslow
> That shows like this "Grade F on Compress components with gzip". any
> idea about this.
Looks li
On Apr 27, 10:17 am, kevid wrote:
> hi all,
>
> I need to make use of "Hpricot gem"
> files. I don't want to install it as a gem. I copied lib/hpricot/*{all
> files} and lib/hpricot.rb to my application.
>
> below is lib/hpricot.rb
>
> begin
> require 'encoding/character/utf-8'
> rescue Load
On Apr 21, 7:17 am, "tashfeen.ekram" wrote:
> Actually, I am interested in the former. That is, scan table and once
> it is done start form the top again and scan again without any delay.
http://cr.yp.to/daemontools.html should help (on Unix).
Your Ruby script has an endless loop. daemontools
Piotr Mąsior wrote:
> Model is passed by @model variable with nested attributes so it is
> like:
>
> @model = model.new
> @model.build_another
>
> at form it is looped through like
>
> - form_for @account, :url => { :action => @given_action , :controller
> => 'admin'} do |f|
> - f.fields_for :
Piotr Mąsior wrote:
> So painful, I was wondering is there any dry_save or something like
> this ?
How do you populate your @model?
Stephan
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To po
I came across a ticket by Craig Webster at
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4247-customising-asset-paths#ticket-4247-5
and found it quite interesting.
Quote:
This patch allows you to set the way that asset paths are rewritten. My
own use case was to accommodat
On Oct 5, 4:42 pm, Dudebot wrote:
> Here's a question:
>
> I have the exact same validation code in 2 different models.
>
> OK, you're thinking, combine the models. Not in this case.
>
> So, in Rails, is there a way to reference the same validation for 2
> different models?
Commonly you can fin
Josef Wolf wrote:
> On Thu, Sep 03, 2009 at 12:02:05AM +0200, Stephan Wehner wrote:
>> Josef Wolf wrote:
> Thanks for your help, Stephan!
>
>> > So I am looking for a possibility to specify the directory relatively.
>> > host: `pwd`/db/pgdata
>> >
Josef Wolf wrote:
> Hello folks,
>
> I'd like to use postgresql with unix domain sockets for
> testinng/development
> to avoid mismatches when tests from multiple working copies are run
> concurrently.
>
> I can almost get what I want with the following entry in
> config/database.yml:
>
> t
Stephan Wehner wrote:
> Frederick Cheung wrote:
>> On May 17, 3:13�pm, Stephan Wehner
>> wrote:
>>> Rails projects, each possibly having different migrations which are
>>> applied to different (mysql) databases.
>>>
>>> Opening a (mys
Colin Law wrote:
> 2009/5/21 Stephan Wehner
>
>>
>>
> I am trying to avoid a db query each time I reference the (constant) id
> when
> the application is running, that was the idea of looking it up when the
> class is loaded and saving in a constant (which does
Colin Law wrote:
> Any thoughts anyone?
>
> Colin
>
> 2009/5/20 Colin Law
I guess here are two, but your question looks vague.
Does
item.id == Item.named_scope_for_constant_record.id
not become
"the item satisfies the condition of the
named_scope_for_constant_record" ?
If for the
Today there was a posting by Stefano di Paola to the Web Security
Mailing List,
http://www.webappsec.org/lists/websecurity
about "HTTP Parameter Pollution", with a reference to his and Luca
Carettoni presentation at
http://www.owasp.org/images/b/ba/AppsecEU09_CarettoniDiPaola_v0.8.pdf
Th
Frederick Cheung wrote:
> On May 17, 3:13�pm, Stephan Wehner
> wrote:
>> Rails projects, each possibly having different migrations which are
>> applied to different (mysql) databases.
>>
>> Opening a (mysql) prompt would require looking up the name of the
>>
Colin Law wrote:
> I have a bit of a problem trying to implement using TDD. As I
> understand it
> the idea is to decide what you want the code to do, write a test to
> check
> that it does, then write the code and get it to pass the test.
>
> I keep coming across a problem with this, here is
firelinemx wrote:
> hi guys
> i am newbie in ror. i wanna test my simple ror application on windows
> xp. i use Webrick as my web server.
> i don't know how to configure my action mailer for sending email to
> another addresses?
>
> config.action_mailer.delivery_method = :smtp
> config.action_mai
Jim Burgess wrote:
> Thanks for your reply
>
>> Looks like a case for allow_nil:
>>
>> validates_numericality_of :children, :allow_nil => true
>
> I created the field 'children' as a string (can't remember why, perhaps
> because someone might enter 'none'??), so that doesn't work.
>
> Is ther
Jim Burgess wrote:
>
>> you can even shorten that to
>>
>> validates_numericality_of :children, :if => Proc.new { |applicant|
>> applicant.children !="" }
>>
>
Looks like a case for allow_nil:
validates_numericality_of :children, :allow_nil => true
The documentation at
http://ar.rubyonrails
Ghazaleh Mir wrote:
> hello
> i made a select list like this
>
> Married
> Single
> Divorced
>
>
> how can i save the selected item into a field "stat" of the table
> "user"?
See the documentation for select at
http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html
S
magic_hat wrote:
> Hey all. I'm trying to export my app's data from mysql to postgres in
> advance of a database switch.
>
> I've tried this:
>
> task(:export => :environment) do
> @users=User.find(:all)
> ActiveRecord::Base.establish_connection(:pg)
> for user in @users
> us
Hello everybody,
I wrote a script to open a database prompt based on the contents of
database.yml
See the rdb_prompt directory under
http://github.com/stephanwehner/railsgoodies
I find it very useful, since I work with several different branches of
Rails projects, each possibly having differ
31 matches
Mail list logo