I've been having a play with eBay and PayPal API calls and am happily
getting xml responses using Net::HTTP calls but now I'm wondering if I
can use ActiveResource instead.
I've created a very basic ActiveResource class that has self.site set to
a full url that returns xml data in a browser
Why not use Robby Russells walkthrough:
http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition?
He does a great job, and when you're done, you have all you need.
:-) Lasse
2010/2/13 john h johnhoec...@gmail.com
At my dev box it doesn't listen to the group parameter either. Just to let
you know that it isn't just your box – maybe something in Rails 3?
2010/2/13 Steve Rowley srow...@gmail.com
I'm using SQLite on my dev box and MySQL in production. I'm also
running an old mysql adapter gem in production
That's fine, but Rails normally includes the prototype libs, so you
could have done it in one line:
:onclick = ELEMENT_NAME.hide();return false
On Feb 13, 12:24 pm, Patrick G. li...@ruby-forum.com wrote:
I don't like self-answered posts...
I've found a solution. I have created a simple
Hi, trying to use rails to create an app, and get the following error
message :-
$ rails testapp
undefined method `camelize' for app:String
I have the following setup/versions :-
* Windows 7
* Cygwin - GNU bash, version 3.2.49(23)-release (i686-pc-cygwin)
Versions via Cygwin :-
* ruby
On Feb 14, 6:56 am, Craig White craigwh...@azapple.com wrote:
%= Picture.some_method % I am still up a creek without a paddle
this works but clearly doesn't belong in a view...
% @pic_1 = Picture.find(:first, :conditions = [active =
true], :order = 'view_count'); @pic_1.view_count += 1;
f.label 'something'
produces
Something
instead of
something
How can I force f.label to have a lower case initial letter?
--
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
On Feb 14, 6:54 am, Frank Kim railso...@gmail.com wrote:
I have a model, let's call it Player.
It has many Trophies.
How do I do a simple query in Rails in my controller that will return
let's say all Players that have more than 5 tropies?
Sorry for the dumb question but I can't figure
From this page:
http://www.therailsway.com/2007/9/3/using-activeresource-to-consume-web-services
1. The service must understand Rails-style REST URLs. (e.g. “POST
/credit_cards.xml” to create a credit card, etc.)
2. The service must respond with a single XML-serialized object
Thanks everyone, that was really helpful!
On Sun, Feb 14, 2010 at 4:31 AM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Feb 14, 6:54 am, Frank Kim railso...@gmail.com wrote:
I have a model, let's call it Player.
It has many Trophies.
How do I do a simple query in Rails in my
tashfeen.ekram wrote:
What about ordinary SOAP requests? Is Net::HTTP the way to go for
that?
Take a look at ActiveMerchant's code; specifically the commit method in
the module
It depends on what you want the method to do.
Inside the Picture class, this should work:
class Picture ActiveRecord::Base
# ...
def self.get_most_viewed_picture
pic = Picture.find(:first, :conditions = [active = ?, true], :order
= 'view_count DESC')
pic.increment! :view_count
f.label :something, something
:-) Lasse
2010/2/14 Ralph Shnelvar li...@ruby-forum.com
f.label 'something'
produces
Something
instead of
something
How can I force f.label to have a lower case initial letter?
--
Posted via http://www.ruby-forum.com/.
--
You received this message
Lasse Bunk wrote:
f.label :something, something
:-) Lasse
2010/2/14 Ralph Shnelvar li...@ruby-forum.com
Well ... that certainly was simple but then what is the purpose of
the first parameter? What are the downsides to
f.label '', something
?
--
Posted via
Yeah it's pretty simple :-)
The purpose of the first parameter is to provide an ID for the label and
optionally a default text for the label. This is used if you don't provide a
second parameter.
Check out
http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M001604
and
Ralph Shnelvar wrote:
Lasse Bunk wrote:
f.label :something, something
:-) Lasse
2010/2/14 Ralph Shnelvar li...@ruby-forum.com
Well ... that certainly was simple but then what is the purpose of
the first parameter? What are the downsides to
f.label '', something
?
OK ... I
Super – glad you found out :-)
Lasse
2010/2/14 Ralph Shnelvar li...@ruby-forum.com
Ralph Shnelvar wrote:
Lasse Bunk wrote:
f.label :something, something
:-) Lasse
2010/2/14 Ralph Shnelvar li...@ruby-forum.com
Well ... that certainly was simple but then what is the purpose
Hi,
I added a textarea to my edit student form, to be able to add tags to
this student. I did the simple code below, and this is the error i get.
I can't see what i did wrong...
#Error message
Processing StudentsController#update (for 127.0.0.1 at 2010-02-14
10:13:22) [PUT]
Parameters:
The underlying meaning of this statement is; Rails as a framework use
to favour a certain Javascript framework (Prototype). This doesn't
mean that you alone would need to write your own solution for JQuery,
but someone, somewhere *did* have to write JRails. Likewise, if you
wanted to use
I think you need to add :tag_attributes to attr_accessible in your model –
would this fix the problem?
Lasse
2010/2/14 Greg Ma li...@ruby-forum.com
Hi,
I added a textarea to my edit student form, to be able to add tags to
this student. I did the simple code below, and this is the error i
On Feb 14, 2010, at 1:29 PM, Greg Ma wrote:
Hi,
I added a textarea to my edit student form, to be able to add tags to
this student. I did the simple code below, and this is the error i
get.
I can't see what i did wrong...
#Error message
Processing StudentsController#update (for 127.0.0.1
Lasse Bunk wrote:
I think you need to add :tag_attributes to attr_accessible in your model
–
would this fix the problem?
Lasse
2010/2/14 Greg Ma li...@ruby-forum.com
it works! Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to
I have a Teams that has_many Players.
I need to get the list of Teams that have no active players (whether
they have 0 players or they have a lot of players all of whom are non-
active).
Can't figure out the conditions for doing this other than subtracting
the ones with active players from the
Try:
named_scope :without_active_players, :conditions = NOT EXISTS(SELECT *
FROM players WHERE team_id=teams.id AND status='active'), :order = name
Does this work?
Lasse
2010/2/14 cpr crosebr...@gmail.com
I have a Teams that has_many Players.
I need to get the list of Teams that have no
Hi everyone!
Please, try out my plugin for image upload with nicEdit.
http://github.com/sergio-fry/Simple-nicEdit.
Reply to :
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/3bc17b66993c7375
--
You received this message because you are subscribed to the Google Groups Ruby
On Sun, 2010-02-14 at 17:06 +0100, Lasse Bunk wrote:
It depends on what you want the method to do.
Inside the Picture class, this should work:
class Picture ActiveRecord::Base
# ...
def self.get_most_viewed_picture
pic = Picture.find(:first, :conditions = [active = ?,
true],
He shoots. He scores!
Thanks much for the insight.
-Chris
On Feb 14, 12:15 pm, Lasse Bunk lasseb...@gmail.com wrote:
Try:
named_scope :without_active_players, :conditions = NOT EXISTS(SELECT *
FROM players WHERE team_id=teams.id AND status='active'), :order = name
Does this work?
Lasse
hart...@gmail.com wrote:
Hi,
I am fairly new to rails and am trying to figure out the right way to
do pagination with ActiveResource. I am considering just wrapping
will_paginate over everything but I before I do I was hoping to get
some input from some more experienced developers.
I would like to verify a parameter is present before a search is posted.
min_age = params[:min_age]
max_age = params[:max_age]
@users = User.find(:all,
:conditions = [years = ? AND years = ? min_age,
max_age])
Basically I am just concerned about the max_age.
I tried this:
I'm a windows user, and I was using ruby 1.8.6 installer over at
RubyInstaller.org. All was working well, but I decided to give ruby
1.8.7 a try. I uninstalled 1.8.6, downloaded and installed ruby 1.8.7
from rubyinstaller, reinstalled rails and all of my gems, and copied
over sqlite3.def and
Nevermind. I'm an idiot.
I forgot to install the actual sqlite3 GEM.
gem install sqlite3-ruby --source http://gems.rubyinstaller.org
Problem solved, and sorry to waste a post.
On Feb 15, 12:03 am, AlwaysCharging goodg...@gmail.com wrote:
I'm a windows user, and I was using ruby 1.8.6 installer
Dear all,
i have a html file in my local path.
In that html file i have below tag.
img src=/2010-01-12/Capture/1210420100112145725141.jpg /
Now what i need is i want to modify the above tag into
img src=/Capture/1210420100112145725141.jpg /
i want to replace all the image path like above
hey,
I am making a new project, and I've been having trouble deciding
between rails and 3.5 and rails 3.0.0 beta one. I realize that rails
3.0.0 should be out of beta sometime mid-summer, which is around the
time I expect to launch a project. I try to think ahead, and in many
ways it makes sense
And you can actually represent this in AR friendly syntax; no console
in front of me but its something like
Player.find(:select = players.id, :joins = :trophies, :group =
'players.id', :having = 'count(players.id) 5')
Downside of this is that the returned objects in this case would only
have ID
On Sun, Feb 14, 2010 at 10:43 PM, princezuda kingz...@gmail.com wrote:
hey,
I am making a new project, and I've been having trouble deciding
between rails and 3.5 and rails 3.0.0 beta one. I realize that rails
3.0.0 should be out of beta sometime mid-summer, which is around the
time I
I have I18n working.
I translated my en.yml file to German (de.yml) and hae set DE as the
default language in environment.rb.
Everything is almost working.
My problem is that I am getting this
�
char ... instead of this
ä
on the screen displays.
I have set
meta http-equiv=Content-Type
36 matches
Mail list logo