This is my table
model name is bids
id | bid | keyword
1 | 2 | orange
2 | 3 | orange
3 | 1 | red
4 | 3 | blue
5 | 6 | red
what i want is the get these the top bidder of each unique keyword in
one .find statement
--~--~-~--~~~---~--~~
You
When i use Model.all and i want to save this one value into all the
rows of the model how do i do it without using a for loop.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to
I am using the daemons plugin.
I have just one problem how do i add modules from the /lib folder to
the /lib/daemons/daemon.rb file
eg. /lib/basic_functions.rb
this is the file i want to load in daemon.rb
contents daemon.rb:
#!/usr/bin/env ruby
# You might want to change this
ENV[RAILS_ENV]
with rails 2.2.2 action mailer requires a valid ssl certificate
i have a question about routing
my smtp settings for my postfix are now
ActionMailer::Base.smtp_settings = {
:address = smtp.mydomain.com,
:port = 25,
:domain = mydomain.com,
:authentication = :plain,
:user_name =
Hi,
I am having problems configuring my actionmailer to work with postfix.
I followed this tutorial:
http://howtoforge.org/virtual-users-and-domains-postfix-courier-mysql-centos5.1
and i got the server set up.
at first i fixed the mail settings to work with gmail using this
tutorial:
Hi,
i am having a very weird problem i have an array
Model:
serialize :marketarray
Controller
@marketobject = Market.find(1)
@marketobject.marketarray = [red,blue,green]
I do this @marketobject.marketarray.slice!(0)
@marketobject.save!
but it does not change the Market.marketarray to
I have been trying to change the font size in the select_date but i
haven't had any luck
here's what i did:
%= select_date( Date.today, :prefix = 'prom_date_end', :order =
[ :day,:month, :year], :html = {:style = font-size: xx-small;}) %
--~--~-~--~~~---~--~~
You
Hi, i was just wondering if its is possible to put a if statment
inside the find conditions
for example:
grovery_price = model.find(:first, :conditions = [ if x = ? then y
must = ?, 200, 300]
I have been googling for some time for a solution to this but i just
can't seem to find any.
Hi when ever i do
rescue Exception = e
flash[:error] = e.message
the e.message will always contain the Validation error: string and
the Object
Example:
Validation failed: Price message:, Price message
How do i tell rails that I just want the message? and not
Hi,
I have tried creating a not equal condition in the find statment but
it just outputs an empty array.
model.find(:first, :conditions = [ id = ? AND market = ? AND
promotion ? , id , name, y],:order = 'id desc').price
I have tried != instead of
I have tried googling for the answer but i
How do i change the ajax failure message
% remote_form_for(:comment, :url = grocery_comments_path(params
[:id]),
:html = { :id = 'new_comment_form' }, :method = :post, :update =
{ :failure = error }) do |form| %
the :update = { :failure = error }
gives me the usual error messages
Hi, after i click submit and refresh the parital(with
page.replace_html) with the remote_form_for, the %=
form.text_area :body, :rows = 10, :cols = 40 % still contains the
previous text. how do i totally remove the text inside of it?
--~--~-~--~~~---~--~~
You
Never mind i got it
@comment.body = before the page.replace
On Nov 1, 1:34 am, tyliong [EMAIL PROTECTED] wrote:
Hi, after i click submit and refresh the parital(with
page.replace_html) with the remote_form_for, the %=
form.text_area :body, :rows = 10, :cols = 40 % still contains
Hi, I am a noobie. I just want to know what is the standard or most
effective way of doing this
I have two functions
def display_price(grocery,batch)
grocery_price = grocery.send(batch).price
if grocery_price
.
On Aug 27, 9:12 am, tyliong [EMAIL PROTECTED] wrote:
protect_from_forgery :only = [:create, :delete, :update]
Questions:
(1)why do i need to put it in when i get an authenticate token error
from passing an :id from the controller through AJAX?
(2)are there any disadvantages
Hi, when i use the updatepassword action, it does not refresh the ajax
partial but forces the browser to save a file
why does that happen?
def updatepassword
@user = current_user
return unless request.post?
if User.authenticate(current_user.login, params[:old_password])
16 matches
Mail list logo