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 window
hange to the app your
> sessions would all be invalid, which causes nasty errors that are hard
> to decipher. Set the key by hand or via a generator or something when
> you create the app then leave it alone.
>
>
> On Nov 1, 3:56�pm, Jam
find_cart_from_session
> debugger
> if session[:cart] # if there's is a cart in the session
>
> and take a look at session[:cart]. Is it a blank string, what class is
> it, etc.
>
>
>
> On Nov 1, 1:09�pm, James West
--
Posted via http://www.ruby-forum.com/.
I have a really horrendous problem with sessions.
before_filter :find_cart_from_session
private
def find_cart_from_session
if session[:cart] # if there's is a cart in the session
begin
@cart = Cart.find(session[:cart]) # return existing or new cart
rescue ActiveRecord::Re
Philip Hallstrom wrote:
>> Philip Hallstrom wrote:
>>> This doesn't sound right at all... I've got many forms using form_for
>>> and f.file_field, etc... and this isn't an issue for me. Nothing
>>> special I'm doing to prevent it... are you sure you're not setting
>>> that field to something some
Philip Hallstrom wrote:
> This doesn't sound right at all... I've got many forms using form_for
> and f.file_field, etc... and this isn't an issue for me. Nothing
> special I'm doing to prevent it... are you sure you're not setting
> that field to something somewhere in a before filter or somethi
Hi all,
I have a really really annoying problem that's driving me nuts with
file_field and paperclip and having to upload images everytime a form is
edited even though the user is quite happy with the currently uploaded
image or loose the previously uploaded image.
This seems to be caused by the
Matt Jones wrote:
> You're probably better off starting by looking at Paperclip's S3
> support, which is logically closer to what you want to do.
>
> --Matt Jones
>
>
> On Oct 3, 10:15�am, James West
Thank you Matt
I'm struggling to understand how the rig
Hi all,
I'm needing to extend the Paperclip Storage module to handle external
URL's so that I can upload my doc's/images to an external source rather
than the app's local file system.
The FileSystem module reads
module Filesystem
def self.extended base
end
def exists?(styl
I would need to be able to upload images to an external URL
I know S3 is an option but there are better image hosts out there for my
requirements and one in particular I would like to make use of.
I'm thinking that I could use asset_host to determine the url and path
but I can't seem to make Pape
the blog)
> to handle users browsers picking up images directly from
> www.unlimitedwebhosting.co.uk?
>
> 2009/9/26 James West :
>>> � (a) a simple cost model for use of the site, e.g. free up to X but
>> Use an external repository for your images that has unlimi
Greg Hauptmann wrote:
> Hi,
>
> Any ideas/suggestions re what a good cost model / approach would be if
> one's Ruby on Rails application was to be successful, but noting users
> (as part of the service/application) could upload lots of files
> (images etc).
>
> What's a good way of have:
> (a)
Greg Hauptmann wrote:
> any pointers / suggestions re cheapest Rails hosting where they give
> you full access to Apache (to load modules etc)??? Can be a shared
> platform, however not sure if there is a shared platform type hosting
> service where they do give you such access?
Having tried a l
Hi,
I'm trying to get Paperclip to work with asset_host and have totally
failed to do so.
The idea is to use asset_host to specify the url that I want to use for
my image hosting (www.unlimitedwebhosting.co.uk) so that link helpers
will use the image host location instead of the local file system
> Guessing:
>cmd.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) if
> File::ALT_SEPARATOR
>
>
> -Rob
>
> Rob Biedenharnhttp://agileconsultingllc.com
> r...@agileconsultingllc.com
You absolute star :-)
That will do EXACTLY what I need. Thanks so much.
James
--
Posted via http://www.ruby-f
Aldric Giacomoni wrote:
> In Windows:
>>> Dir.chdir 'c:/myscripts'
> => 0
>>> Dir.pwd
> => "c:/myscripts"
>
> I think you're making a mountain out of a molehill. Ruby interprets the
> path properly. Keep it to '/' and do input sanitation when the user
> tries to give you a '\'
>
> Yet, I don't
Marnen Laibow-Koser wrote:
> James West wrote:
>> Hi,
>> Depenbding on whether running under windows or unix/mac I obviously need
>> to use the \ instead of the / character for shell commands so I have 2
>> questions really
>> 1) I would love to know if anyo
Markus Roberts wrote:
>>> Depenbding on whether running under windows or unix/mac I obviously
>>> need
>>> to use the \ instead of the / character for shell commands so I
>>> have 2
>>> questions really
>>> 1) I would love to know if anyone has a neat way of dealing with
>>> converting paths t
James West wrote:
> Hi,
> Depenbding on whether running under windows or unix/mac I obviously need
> to use the \ instead of the / character for shell commands so I have 2
> questions really
> 1) I would love to know if anyone has a neat way of dealing with
> converting paths
Hi,
Depenbding on whether running under windows or unix/mac I obviously need
to use the \ instead of the / character for shell commands so I have 2
questions really
1) I would love to know if anyone has a neat way of dealing with
converting paths to use '\' instead of '/' for use with command line
Matt Harrison wrote:
>
> I have no idea if this is the best method by any means, but I have used
> it before with no problems:
>
> I created a model called AppConfig which had an id, a key and a value. I
> could set the key to the name of the configuration (such as
> "allow_new_signups") and the
This is more about theory than coding so I hope I have the right place.
I would very much appreciate some input as to the best approach on how
to offer different options in my app depending on configuration criteria
and current user.
Some examples of what I want to do I guess would be a help.
Fi
Maurício Linhares wrote:
> It will not degrade automatically, you'll have to tell it to do so
> adding an :href property:
>
> link_to_remote "Delete this post",
> { :update => "posts", :url => { :action => "destroy", :id => post.id
> } },
> :href => url_for(:action => "destroy", :id =>
David Angga wrote:
> just make sure you've include prototype.js.
> and enable javascript function on your browser.
>
> regards.
>
> On 8/24/09, James West wrote:
>> Posted via http://www.ruby-forum.com/.
>>
>> >
>>
>
>
>
I'm just looking at adding some AJAX to my app and am considering
turning some link_to's into link_to_remotes and I could do with knowing
if link_to_remote degrades to an HTML request if javascript is not
enabled in a users browser?
If so, is there anything special I need to do with the link_to_re
Simone R. wrote:
> Hi everybody ...
>
> I was trying to learn RoR by attending a course ... but right now
> there are not enought people so the course probably will not run ... and
> for me is a problem because I need Ror for work :-
>
> If there is someone interested (or if you have some
Chris Olsen wrote:
> Can be done in a one step process or do I have to upgrade to 2.2 then
> 2.3?
>
> Thanks for the help.
After you have updated Rails and set your environment.rb to use the
correct version don't forget to run rake update.
--
Posted via http://www.ruby-forum.com/.
--~--~-
Ritvvij wrote:
> Hi,
>
> I am using tinymce for giving text editor the editing options.
> The problem its giving me is that if I press 1 enter, it actually ends
> up with two enters.
>
> Example:
>
> In editor I tpye
> "
> abc
> abccc"
>
> But it ends up as "
> abc
>
> abccc"
>
> Does any on
I have a helper that uses some jQuery code that I would like to move out
of the helper method.
I am trying to move it to application.js but it will probably end up in
a different file.
I have two reasons for wanting to do this.
1) I want to keep all my jQuery code seperate to my HTML code
2) I wan
Kostas Lps wrote:
> Hi guys,
> i want to create a cart i my application for ordering books (this will
> work only in localhost not in production). Is there any tutorial
> explaining how can this be implemented? Or any good plugin with
> instructions???
> Thanx in advance
> Kostas L.
The AWDWR (A
Colin Law wrote:
> 2009/8/22 James West :
>>
>> It does use 2.3.2 locally but I need to freeze this in for deployment.
>> Maybe I could uninstall 2.3.3 somehow then it would revert back to using
>> 2.3.2 on a gems freeze?
>> I dunno, I'm clutching at straws
Colin Law wrote:
> If you have the line in environment.rb then it should use 2.3.2
> without having to freeze it in. Delete any rails directory in /
> vendor in your application and try the app. If it is not using 2.3.2
> there is something odd going on. Are you sure there is not a typo in
> t
Colin Law wrote:
>
> I am not sure but here is a suggestion. First lock your application to
> 2.3.2 by putting this at the beginning of environment.rb (watch out in
> case there is already a line setting this up)
>
> RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
>
> Check the
Tnis is till plaguing me. Does anyone have any ideas at all?
--
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, send email t
Michael Moulsdale wrote:
> I'm wanting to add some InPlace editing code to my application and
> have seen a number of methods to do this.
>
> I therefore wanted to get a gauge on what this group thinks is the
> best approach for the latest version of ruby and rails?
>
> Michael
You need to elab
Conrad Taylor wrote:
> On Thu, Aug 20, 2009 at 3:24 AM, James West <
> rails-mailing-l...@andreas-s.net> wrote:
>
>>
>> I don't understand why the freeze:edge is failing.
>
>
> What platform are you on and what you're typing at the command prompt?
Wap Addon wrote:
> follow this site instruction and do that way
>
> http://arjunghosh.wordpress.com/2008/04/18/how-to-freeze-rails-application/
Thanks for the reply.
I think I'm missing something. I can't see how that is telling me to do
anything different to the way's I'm trying.
I don't unde
My app doesn't like 2.3.3 mainly due to a known bug in Rails that will
be fixed in 2.3.4
I had 2.3.2 frozen until I downloaded and tested 2.3.3
Now I want to freeze 2.3.2 back into my app but rake rails:freeze:gems
insists on unpacking 2.3.3 and an edge freeze for the 2.3.2 version
fails
C:\De
Marnen Laibow-Koser wrote:
> On Aug 19, 1:07�pm, James West
> wrote:
> [...]
>
> Or you could just increment a counter as you create fields, so that
> you have a serial number to put in your id attributes.
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
Marnen Laibow-Koser wrote:
> On Aug 19, 1:07�pm, James West
> wrote:
> [...]
>
> Or you could just increment a counter as you create fields, so that
> you have a serial number to put in your id attributes.
>
Now that has possibilities. I don't know why I didn&
Marnen Laibow-Koser wrote:
> James West wrote:
>> I need to auto generate a guaranteed to be unique number or string to be
>> used something like this in a partial view >
>
> First of all: what's the purpose of this? Why do you need all these
> unique IDs? I
Gleb Mazovetskiy wrote:
> This certainly looks like an incorrect approach to the problem.
> Could you, please, elaborate on this?
That wouldn't surprise me at all. lol!
It's quite a complicated scenario and I was trying to keep this simple.
Here goes.
I'm working on a multi model form solution
James West wrote:
> Rick Lloyd wrote:
>> You want to use Time.now.to_f if you're worried about more than one
>> hit per second.
>>
>>
>> On Aug 19, 11:44�am, Maur�cio Linhares
>
> Thank you for the fast res
Rick Lloyd wrote:
> You want to use Time.now.to_f if you're worried about more than one
> hit per second.
>
>
> On Aug 19, 11:44�am, Maur�cio Linhares
Thank you for the fast response
Time.now.to_f gives me the following
My partial looks like this
<%tnow = Time.now.to_f%>
<%-lis
I need to auto generate a guaranteed to be unique number or string to be
used something like this in a partial view >
I thought of using time.now but that only goes to seconds. I have tried
rand(time.now) but that does not guarantee a nique ID.
There would be more than one partial created within
Seriously,
The best way to ahieve this is in a stored procedure in the database.
Just create a method on your model class that will run the stored proc,
that way your controllers and rake tasks etc... can have access to the
functionality if you want them to
.
Let the database do the job it's de
Marnen Laibow-Koser wrote:
> James West wrote:
>> Marnen Laibow-Koser wrote:
>>
>>> Why is it a no-brainer? It's not like the money goes to support the
>>> Rails core team.
>>
>> AWDWR is recommended reading on the Rails website.
> [...]
Rocco Di Leo wrote:
> https://rails.lighthouseapp.com/dashboard
>
> On Sat, Aug 8, 2009 at 4:58 PM, James West
> http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Rub
OK this is a Rails bug.
I have done extensive testing now and am able to prove that the code
works on a has many but has_many :through fails.
I'll report it as a bug if someone can tell me how?
Thanks
James
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---
Marnen Laibow-Koser wrote:
> Why is it a no-brainer? It's not like the money goes to support the
> Rails core team.
AWDWR is recommended reading on the Rails website.
Quote from the publishers The Pragmatic Bookshelf
Sam Ruby is a prominent software developer who has made significant
contri
bill walton wrote:
> Hi Colin,
>
> On Fri, 2009-08-07 at 20:39 +0100, Colin Law wrote:
>
>> All of the above suggestions may be valid, however it does not explain
>> how, once the OP has managed by fair means or foul to get hold of the
>> member object that it manages to mutate between his two u
Marnen Laibow-Koser wrote:
> James West wrote:
> [...]
>> Go and buy the pdf AWDWR
>> http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
>
> I suspect the OP knows about AWDWR -- he was looking for open-source
> books.
>
>>
Just as the title sais really. How should I go about reporting a bug in
Rails 2.3.2 and 2.3.3?
Thanks
James
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails:
For what it's worth I am witrh Colin on this but this is covered in the
foot note on page 46 of the pdf
6. If instead you see a message to the effect of No route matches
"/say/hello", try stopping and
restarting your server, because something you have done caused Rails to
cache your configurat
Fla As wrote:
> Hello,
> where can I find open source rails 2 books?
>
> Thank you in advance.
>
> Cheers,
Go and buy the pdf AWDWR
http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
Your software has cost you nothing, putting your hand in your pocket to
find
Karthik Kantharaj wrote:
#> *how can i access the contract_id which is in another table*
:contract_id=>"#...@contract.id}"
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "R
pharrington wrote:
> On Aug 7, 11:54�pm, Phlip wrote:
>> Views should be dumb, Controllers thin, and Models fat.
>>
>> If the deliver_ call were one line, it qualifies for the Controller. But...
>>
>> The delivered template is itself a View. Hence it should be dumb. Hence
>> anything
>> powering
Sijo Kg wrote:
> Hi
>
>Not only doing the above solves all..You have to edit a lot of
> places. Rather than I explain all these and grab a lot more spaces here
> you better read this
> Read section Namespaced Routes in
>
> http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the
James West wrote:
> James West wrote:
> Sorry, I ommited to post the actual error which is now
>
> Cannot modify association 'User#addresses' because the source reflection
> class 'Address' is associated to 'UserRole' via :has_many.
Further investi
Ritvvij wrote:
> Hi,
>
> Which is the most advisable Rich Text Editor plugin / gem to use?
>
> Please advise
I really liked tinymce, simple to use, lightweight and easy to implement
but I couldn't get an image upload to work with it.
I ended up installing and trying about 6 others until I fin
James West wrote:
Sorry, I ommited to post the actual error which is now
Cannot modify association 'User#addresses' because the source reflection
class 'Address' is associated to 'UserRole' via :has_many.
--
Posted
Ilan Berci wrote:
> James West wrote:
>> Further testing shows that if I use a hidden contact_id field in the
>> address form the contact_id gets passed to the params hash as I would
>> expect but I still get the
>>
>
>
> You either have to chan
Further testing shows that if I use a hidden contact_id field in the
address form the contact_id gets passed to the params hash as I would
expect but I still get the
Cannot modify association 'User#administrator_addresses' because the
source reflection class 'Address' is associated to 'Administ
firebug is your friend.
As colin suggested, viewing the source code in your browser will give
you a clue as to what is happening.
If you use firebug (plugin for firefox) to inspect element you will see
all the css, layout and source code, you can even edit the soirce code
as you look at it and
I am totally unable to create a new child in a has_many :through multi
model form using nested_attributes for an existing grandparent.
Sorry, that sounds quite a mouth full.
Basically I am editing an existing user that has many
administrator_addresses through an administrator association.
If I c
+1 for rails playground.
Totally proffesional rails gurus, live chat available manned by rails
techies 24/7, uber helpfull and totally competetive pricing.
Sometime a little too helpfull, I struggled with writing my first
deploy.rb script and asked them in live chat bout what to do and they
wr
66 matches
Mail list logo