Forum: Ruby on Rails Using button_to with a get request

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kim (Guest)
on 2007-02-06 02:52
(Received via mailing list)
I am trying to use a button_to with a get request instead of the
default post. The docs seem to say this is possible but I can not get
it to work.

This is what I have tried:
<%= button_to "Create New Page" , {:controller => 'page', :action =>
'create_page'}, {:method => 'get'}%>

But this still does a post - the html output:
<form method="post" action="/page/create_page" class="button-
to"><div><input method="get" type="submit" value="Create New Page" /></
div></form>

Help please.
Philip H. (Guest)
on 2007-02-06 03:33
(Received via mailing list)
> to"><div><input method="get" type="submit" value="Create New Page" /></
> div></form>
>
> Help please.

You'll have to do something else... the source reads below... and one
line
123 you can see that method=post is hardcoded.  In fact, where you've
got
your :method => 'get' it's going to show up *inside* the <input> button
(as you can see above).


      # File
vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb,
line 110
110:       def button_to(name, options = {}, html_options = nil)
111:         html_options = (html_options || {}).stringify_keys
112:         convert_boolean_attributes!(html_options, %w( disabled ))
113:
114:         if confirm = html_options.delete("confirm")
115:           html_options["onclick"] = "return
                          #{confirm_javascript_function(confirm)};"
116:         end
117:
118:         url = options.is_a?(String) ? options : url_for(options)
119:         name ||= url
120:
121:         html_options.merge!("type" => "submit", "value" => name)
122:
123:         "<form method=\"post\" action=\"#{h url}\"
                         class=\"button-to\"><div>" +
124:           tag("input", html_options) + "</div></form>"
125:       end
Don S. (Guest)
on 2007-02-06 22:20
(Received via mailing list)
Are you happy with your dedicated server, your ISP, and the distro you
use?
Everyone else who needs to be using a dedicated server would like to
know --
I'm not kidding. Since the only dependable recipe for picking a
dedicated
server ISP is to hear of the successful experiences of other Rails
developers, I suggest the following:

If you'll email the following info (or more) directly to me:

ISP URL:
Distro you're using:
# of dedicated servers you have:
If more than one server, cluster architecture:
Comments:

...I will assemble the responses (keeping sources anonymous) and post
that
result back to the list.

Thank you!

Don

PS: I'm aware this topic makes periodic appearances in this list. But in
scanning the past six months of messages containing the word "dedicated"
I
found only one clearly enthusiastic recommendation: rimuhosting.com.
Surely
as a collective community we have a lot more information than this.
Perhaps
since I am willing to collate, anonymize and repost, enough of y'all
will
email me so that we will all have a valuable shortlist of potential
candidates. Thanks again!

----------------------------------------------------------------------------
----

Don S.
removed_email_address@domain.invalid
www.stonecutter.com & www.peerworks.org
209-878-3548
209-770-0070 [cell]
425-671-3821 [fax]
James M. (Guest)
on 2007-02-06 22:23
(Received via mailing list)
I've very happy with eApps.

--
James M.
Greg D. (Guest)
on 2007-02-06 22:38
(Received via mailing list)
On 2/6/07, Don S. <removed_email_address@domain.invalid> wrote:
> # of dedicated servers you have:
> If more than one server, cluster architecture:
> Comments:
>
> ...I will assemble the responses (keeping sources anonymous) and post that
> result back to the list.


Did you check out http://railshostinginfo.com/ ?  I think it's kinda
new but there might be some stuff you can use there.



--
Greg D.
http://destiney.com/
Keynan P. (Guest)
on 2007-02-06 22:38
use link_to '', {}, {:class => 'imitation_button'}

then add to your stylesheet

that or write a form partial.
Jordan K. (Guest)
on 2007-02-06 23:24
(Received via mailing list)
On 2/6/07, Greg D. <removed_email_address@domain.invalid> wrote:

> On 2/6/07, Don S. <removed_email_address@domain.invalid> wrote:
> > Are you happy with your dedicated server, your ISP, and the distro you use?
> > Everyone else who needs to be using a dedicated server would like to know --
> > I'm not kidding. Since the only dependable recipe for picking a dedicated
> > server ISP is to hear of the successful experiences of other Rails
> > developers, I suggest the following:
> >
> > ...I will assemble the responses (keeping sources anonymous) and post that
> > result back to the list.

> Did you check out http://railshostinginfo.com/ ?  I think it's kinda
> new but there might be some stuff you can use there.

This would probably be more applicable/informative/useful on the
rails-deploy list as well.

J.
Don S. (Guest)
on 2007-02-07 22:22
(Received via mailing list)
Jordan,

I appreciate your response, as I did not know, or had forgotten, that
the
rails-deploy list existed. Yes, that would surely be a better forum, and
I
will repost there.

Thank you,

Don
Hendy I. (Guest)
on 2007-02-09 06:44
(Received via mailing list)
On 2/7/07, Don S. <removed_email_address@domain.invalid> wrote:
>
> Jordan,
>
> I appreciate your response, as I did not know, or had forgotten, that the
> rails-deploy list existed. Yes, that would surely be a better forum, and I
> will repost there.

Hi Don!

I have a Lunarpages <http://www.lunarpages.com/id/lunarailscom> (shared
though) and they're good. They also provide VPS and dedicated. Maybe you
want to check them out.

A nicer alternative (IMHO) to dedicated is slice-based hosting. Which is
maybe like scalable VPS. EngineYard <http://www.engineyard.com/> seems
to be
a very good choice if you're looking for quality (quite costly). There
is
also SliceHost <http://www.slicehost.com/>, which is cheaper but they'll
help you manage your VPS.

Check out my page at
http://web2withrubyonrails.gauldong.net/rails-hosting/for more ideas.

The general site http://hosting-reviews.com may also give you some more
added thoughts. :-)

Hope this helps. :-)


> Subject: [Rails] Re: Survey to find dedicated server ISPs that Rails
> > > picking a dedicated server ISP is to hear of the successful
>
> J.
>
>
>
>
> >
>


--
Hendy I.
Web: http://hendy.gauldong.net
Mobile: +62 856 24889899
Yahoo Messenger: ceefour666
LinkedIn: http://www.linkedin.com/in/ceefour
Hendy I. (Guest)
on 2007-02-09 06:46
(Received via mailing list)
On 2/6/07, Don S. <removed_email_address@domain.invalid> wrote:
>
> Are you happy with your dedicated server, your ISP, and the distro you
use?
> Everyone else who needs to be using a dedicated server would like to know
--
> I'm not kidding. Since the only dependable recipe for picking a dedicated
> server ISP is to hear of the successful experiences of other Rails
> developers, I suggest the following:

Hi Don!

I have a Lunarpages <http://www.lunarpages.com/id/lunarailscom> (shared
though) and they're good. They also provide VPS and dedicated. Maybe you
want to check them out.

A nicer alternative (IMHO) to dedicated is slice-based hosting. Which is
maybe like scalable VPS. EngineYard <http://www.engineyard.com/> seems
to be
a very good choice if you're looking for quality (quite costly). There
is
also SliceHost <http://www.slicehost.com/>, which is cheaper but they'll
help you manage your VPS.

Check out my page at
http://web2withrubyonrails.gauldong.net/rails-hosting/for more ideas
and reviews of the services I know.

The general site http://hosting-reviews.com may also give you some more
added thoughts. :-)

Hope this helps. :-)

--
Hendy I.
Web: http://hendy.gauldong.net
Mobile: +62 856 24889899
Yahoo Messenger: ceefour666
LinkedIn: http://www.linkedin.com/in/ceefour
Robby R. (Guest)
on 2007-02-09 07:13
(Received via mailing list)
Don S. wrote:
> Are you happy with your dedicated server, your ISP, and the distro you use?
> Everyone else who needs to be using a dedicated server would like to know --
> I'm not kidding. Since the only dependable recipe for picking a dedicated
> server ISP is to hear of the successful experiences of other Rails
> developers, I suggest the following:
>
> If you'll email the following info (or more) directly to me:
>
> ISP URL:

http://www.planetargon.com/

All of our dedicated machines have been customized per customer. You can
use the contact page form to inquire.

> Distro you're using:

CentOS, Fedora, and Debian

Many of our development customers become managed co-location customers.

Cheers,

Robby


--
Robby R.
http://www.robbyonrails.com/
http://www.planetargon.com/
Tom M. (Guest)
on 2007-02-09 07:17
(Received via mailing list)
On Feb 8, 2007, at 8:43 PM, Hendy I. wrote:

> On 2/7/07, Don S. <removed_email_address@domain.invalid> wrote:
>
> > I appreciate your response, as I did not know, or had forgotten,
> that the
> > rails-deploy list existed. Yes, that would surely be a better
> forum, and I
> > will repost there.

snip...

> A nicer alternative (IMHO) to dedicated is slice-based hosting.
> Which is maybe like scalable VPS. EngineYard seems to be a very
> good choice if you're looking for quality (quite costly).

Thank you for the kind words, Hendy.

Our customers actually consider us rather inexpensive as the level of
service and expertise we bring literally saves them an operations
team in many cases. How much is *that* worth?

We just survived our first Digging today. Our good customer
change.org rose to the home page, and boy, did the traffic follow!
We're happy to have a Digging under our belts. We've also survived a
couple of TechCrunchings, for kongregate.com, gubb.net and change.org
as well.

--
-- Tom M., CTO
-- Engine Y., Ruby on Rails Hosting
-- Reliability, Ease of Use, Scalability
-- (866) 518-YARD (9273)
Jeremy McAnally (Guest)
on 2007-02-09 23:15
(Received via mailing list)
Has anyone had any experience with ServerPronto?  They're the only
dedicated option within my conceivable price range, but the low price
makes me think of ill of the quality of service.

--Jeremy

On 2/6/07, Don S. <removed_email_address@domain.invalid> wrote:
> Distro you're using:
>
>
> Don S.
> removed_email_address@domain.invalid
> www.stonecutter.com & www.peerworks.org
> 209-878-3548
> 209-770-0070 [cell]
> 425-671-3821 [fax]
>
>
> >
>


--
http://www.jeremymcanally.com/

My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
Hendy I. (Guest)
on 2007-02-10 05:34
(Received via mailing list)
On 2/10/07, Jeremy McAnally <removed_email_address@domain.invalid> wrote:
>
> Has anyone had any experience with ServerPronto?  They're the only
> dedicated option within my conceivable price range, but the low price
> makes me think of ill of the quality of service.

Thanks Jeremy I've downloaded your book (EXCELLENT) and I've put
serverpronto at http://web2withrubyonrails.gauldong.net/rails-hosting/
. I mentioned your name because I know ServerPronto from you so let me
know if you mind me doing that.

Thanks again :-)

--
Hendy I.
Web: http://hendy.gauldong.net
Mobile: +62 856 24889899
Yahoo Messenger: ceefour666
LinkedIn: http://www.linkedin.com/in/ceefour
Jeff B. (Guest)
on 2007-02-10 05:59
(Received via mailing list)
On 2/6/07, Don S. <removed_email_address@domain.invalid> wrote:
> ISP URL:
> Distro you're using:
> # of dedicated servers you have:
> If more than one server, cluster architecture:
> Comments:



Don,

I have a 512MB slice on slicehost.com and am very happy with their
service.
The server works well, is very responsive, and has been very reliable.

I use Gentoo 64bit Linux and have been very happy with it. I can
customize
and tune exactly what is installed and keeping things up to date with
security fixes is very easy with the Gentoo portage system. Another nice
thing about Gentoo is that nearly anything you would want to install is
already to go and just a simple emerge away. This has proven to be much
easier than any other distro I have used, plus I can compile anything
with
exactly the features I want.

I haven't yet needed an additional server but I know where I will go to
get
one :-)

The staff at slicehost.com is very knowledgable and ready to help. I
would
definitely recommend slicehost.com.

Jeff B.
Jeremy McAnally (Guest)
on 2007-02-10 17:03
(Received via mailing list)
>
> Thanks Jeremy I've downloaded your book (EXCELLENT) and I've put
> serverpronto at http://web2withrubyonrails.gauldong.net/rails-hosting/

OK, cool!  They look decent, and I've only found one little pocket of
bad reviews from them.  If I end up going with them, I'll let you know
how my experience goes!

> . I mentioned your name because I know ServerPronto from you so let me
> know if you mind me doing that.
>
> Thanks again :-)
>

No way!  That's perfectly fine.

Thanks for building that list; there were a few that I hadn't heard of
and can now suggest.

--Jeremy

--
http://www.jeremymcanally.com/

My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
Vishnu G. (Guest)
on 2007-02-12 08:52
(Received via mailing list)
+1 for slicehost.com.

Vish
This topic is locked and can not be replied to.