Hi all,
My question is related to the sqlite db I'm using with my rails app.
I was thinking if its possible to save the file
(ROR_DIR/db/development.sqlite) and then if somehow the db gets erased
or if I do a rollback and then a migrate can I retrieve my information
by copying the file back to the
Hey Guys,
Before Rails 3.0 I was to be able invoke some javascript before and
after an ajax call was made, like this:
link_to_remote aLabel, url, :before=$('indicator').show(),
:complete=$('indicator').hide()
In Rails 3.0, I understand I need to use link_to and pass the parameter
:remote=true.
Bryan Crossland wrote in post #995429:
On Wed, Apr 27, 2011 at 6:11 PM, Erwin yves_duf...@mac.com wrote:
wrong on the server side ?
is there any way to test with another library ?
thanks for your feedback
When I try that URL in my browser I get a broken video icon. I think
your
URL is
On 28 April 2011 01:06, Luis Lavena luislav...@gmail.com wrote:
Add a vm running Ubuntu and do your rails work on it. You will have more
support than trying to deal with Windows, also, chances are you will be
deploying to a Linux environment so it will put you more on the game.
Could be, but
On 28 April 2011 02:37, amrit pal pathak amritpalpath...@gmail.com wrote:
On Apr 27, 10:52 am, Pale Horse li...@ruby-forum.com wrote:
amritpal p. wrote in post #995323:
class SayController ApplicationController
def hello
@timee = Time.now
end
def goodbye
end
end
On 28 April 2011 07:00, Anush J. li...@ruby-forum.com wrote:
Hi all,
My question is related to the sqlite db I'm using with my rails app.
I was thinking if its possible to save the file
(ROR_DIR/db/development.sqlite) and then if somehow the db gets erased
or if I do a rollback and then a
hmm never ran it under windows but I'm curious if using cygwin or
jruby might be an option.
Other windows tools I am aware of are pik https://github.com/vertiginous/pik
and IronRuby
http://www.ironruby.net/
OP I'm not going to tell you to switch OSes and you have a very good
question. I am
I'm trying to create a redmine plugin that uploads files.
I used this tutorials:
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm
http://www.redmine.org/projects/redmine/wiki/Plugin_Tutorial
I already succeeded in uploading files using ruby on rails...
I want to integrate
On 28 Apr 2011, at 03:22, Ernesto Rocha ernestorro...@gmail.com wrote:
Guys,
I'm using some AJAX on my application, but when protect_from_forgery is on
sometimes it works and sometimes the user session is killed. Today i found
out why.
It happens the following:
The
amritpal p. wrote in post #995439:
Instead of a href=/say/goodbyeGoodbye/a, use %= link_to
Goodbye, :action = goodbye %
It didn't help, error says:
No route matches {:controller=say, :action=goodbye}
Of course it didn't, but you are working in a Rails
environment so you ought to be using
hi ,
I want to store image data in mySQL database using rails.
I have created a table called Photo_info which have field called
photo_data and the data type of that field is varchar.
My code is:
path = C:/test_sqs/public/images/rails.png
File.open(path, 'rb'){ |file| @data= file.read }
When
Thanks for the reply!
I am not quite sure what you meant with 'calling a Model method
directly', probably this one, or?
%Watchedfamily.create!(params[:watchedfamily]) %
So I already changed my code as you can see below. Is that still Code
Smell or is that better?
%= button_to Save Patent,
Hi,
and thanks for the information.
I have searched information about Ruby mapscript but I found only few
articles so I'm not sure about maintenance and support of Ruby
mapscript. PHP mapscripts are widely used and there is lot of
documentation available, I'd prefer Ruby but I have to stay in
Sebastian wrote in post #995486:
I am not quite sure what you meant with 'calling a Model method
directly', probably this one, or?
Watchedfamily is your Model in the example below, 'create!' is the
method called on it and '(params[:watchedfamily])' is what you are
passing to that method.
%
On Apr 28, 9:34 am, News Aanad news.anan...@gmail.com wrote:
hi ,
I want to store image data in mySQL database using rails.
I have created a table called Photo_info which have field called
photo_data and the data type of that field is varchar.
My code is:
path =
please try passing this path and url, since i see you are storing
directly in under the public directory
:url = /system/images/:id/:style/:basename.:extension,
:path = :rails_root/public/system/images/:id/:style/:basename.:extension
just in case.
what is raising the exception is utils.rb which
*bump*
WTF are we supposed to use in place of these methods?
On Apr 9, 7:59 am, axelde...@gmail.com axelde...@gmail.com wrote:
If this function (find_in_batches) is depreciated, what alternative is
there? Same goes for the function find_each... in the current version
of Rails they are still
Thank you!
I am still having the problem that the URI gets too large if I want to
send to much data to the database. How can I avoid this?
Can I maybe call my @fam_pubs variable in the create method of my
watchedfamilies controller, so that it is not needed to send it with
the URI?
If yes how
Thanks for Reply,
But I want to do the same with amazon's SimpleDB which deals only with
String.
How can i do that?
Thanks in Advance
On Thu, Apr 28, 2011 at 2:35 PM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Apr 28, 9:34 am, News Aanad news.anan...@gmail.com wrote:
hi ,
Sebastian wrote in post #995494:
Thank you!
I am still having the problem that the URI gets too large if I want to
send to much data to the database. How can I avoid this?
What do you mean by 'the URI gets too large'? If you are running Rails
3, I suggest you read more on nested form
On Apr 28, 11:03 am, News Aanad news.anan...@gmail.com wrote:
Thanks for Reply,
But I want to do the same with amazon's SimpleDB which deals only with
String.
How can i do that?
I wouldn't if I were you - attribute values are capped at 1024 bytes.
If you want to store images in the
On Apr 28, 10:48 am, subimage subim...@gmail.com wrote:
*bump*
WTF are we supposed to use in place of these methods?
I don't think it is deprecated. However, it moved (it's now at
http://apidock.com/rails/ActiveRecord/Batches/find_in_batches) and it
looks like apidock couldn't work out that
Thank you Fred.
On Thu, Apr 28, 2011 at 4:35 PM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Apr 28, 11:03 am, News Aanad news.anan...@gmail.com wrote:
Thanks for Reply,
But I want to do the same with amazon's SimpleDB which deals only
with
String.
How can i do that?
I have an application (Rails 2.3.10) that is bombing out with the
following message:
A ActiveRecord::StatementInvalid occurred in confirmation#create:
Mysql::Error: Duplicate entry '185' for key 1: INSERT INTO
`confirmations` (`flags`, `quote_id`, `created_at`, `updated_at`,
`id`, `serialnum`)
On Apr 28, 12:53 pm, Owain owain.mcgu...@gmail.com wrote:
mysql insert into confirmations (quote_id) values(188);
Query OK, 1 row affected (0.01 sec)
mysql select * from confirmations where quote_id = 188;
Why are you filtering by quote_id here?
Fred
On Apr 28, 12:57 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
mysql insert into confirmations (quote_id) values(188);
Query OK, 1 row affected (0.01 sec)
mysql select * from confirmations where quote_id = 188;
Why are you filtering by quote_id here?
Fred,
Just to show that
On 28 Apr 2011, at 13:13, Owain owain.mcgu...@gmail.com wrote:
On Apr 28, 12:57 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
mysql insert into confirmations (quote_id) values(188);
Query OK, 1 row affected (0.01 sec)
mysql select * from confirmations where quote_id = 188;
On Wed, Apr 27, 2011 at 08:14:01PM -0500, Phil Crissman wrote:
I can understand having preferences, but I'm not certain I see the
worth in fighting all the Rails conventions; if I were to switch to
django or to cake-php or (something else), I'd think it would make
more sense for me to adopt
On Apr 28, 3:25 am, Colin Law clan...@googlemail.com wrote:
On 28 April 2011 02:37, amrit pal pathak amritpalpath...@gmail.com wrote:
On Apr 27, 10:52 am, Pale Horse li...@ruby-forum.com wrote:
amritpal p. wrote in post #995323:
class SayController ApplicationController
On Wed, Apr 27, 2011 at 05:06:48PM -0700, Luis Lavena wrote:
Could be, but you might be ignoring for a second that this simple
statement might come up with a steeped learning curve (learn a new OS,
bash, a package manager, etc).
But he wasn't ignoring the OP's request. The OP asked for the
wondering if there is a way to do this..
say we have a model that has attributes length and width..
:length and :width
and we have a class square:
class Square ActiveRecord::Base
def area
area = length * width
end
end
is there a way i can do a:
Square.find(:area = '144')
to
amritpal p. wrote in post #995520:
On Apr 28, 3:25am, Colin Law clan...@googlemail.com wrote:
root :to = say#hello
So you think that the above line, which says route '/' to say#hello'
is going to route /say/goodbye somewhere?
No it will not route to /say/goodbye,but it will
Run it to generate a new migration
1)rails generate migration add_price_to_product price:decimal
2)Added following to migration file
class AddPriceToProduct ActiveRecord::Migration
def self.up
add_column :products, :price, :decimal,
:precision = 8, :scale = 2, :default = 0
end
def self.down
Run it to generate a new migration
1)rails generate migration add_price_to_product price:decimal
2)Added following to migration file
class AddPriceToProduct ActiveRecord::Migration
def self.up
add_column :products, :price, :decimal,
:precision = 8, :scale = 2, :default = 0
end
def self.down
I have a program I'd like to write and I'd like to get off of Java and
start using something more productive. I have played around with
Rails, and I think I could the same app in a fraction of the time.
There's one part of the app though that I am not if Rails/Ruby would
be a good fit... so I'd
amritpal p. wrote in post #995533:
Run it to generate a new migration
Then ran rake db:migrate, it created a new columns in table products with
name
price, but it didn't change the view (didn't create a field with name
price)
Why?
The clue's in the name - running rake db:migrate alters
On Apr 28, 2:34 pm, Sergio Ruiz li...@ruby-forum.com wrote:
wondering if there is a way to do this..
say we have a model that has attributes length and width..
:length and :width
and we have a class square:
class Square ActiveRecord::Base
def area
area = length * width
end
On Apr 28, 3:39 pm, egervari ken.egerv...@gmail.com wrote:
I can imagine that these are some very expensive requests. In the java
world, I can simply put the thesaurus and grammar checker (with rules)
entirely in memory as Java beans in a spring container. When the app
starts up, we
On Apr 28, 10:39 am, egervari ken.egerv...@gmail.com wrote:
I have a program I'd like to write and I'd like to get off of Java and
start using something more productive. I have played around with
Rails, and I think I could the same app in a fraction of the time.
There's one part of the app
Ruby already has may c apis that run very fast with a ruby wrapper
around them c code. Also, you can run services that respond to all
this, it would work like memcached does, extremely fast service with a
ruby client. I dont recommend having the thesaurus as a pure ruby
gems. If you can work
On Apr 27, 2:04 pm, Daniel Amsterdam daniel...@msn.com wrote:
Hello all,
i'm starting a new application and as i'm quite new to rails i want to
ask some advise to start this application.
I'm planning to create an application with a search and filter
function (like a search for real estate
On Thu, Apr 28, 2011 at 9:34 PM, Sergio Ruiz li...@ruby-forum.com wrote:
wondering if there is a way to do this..
say we have a model that has attributes length and width..
:length and :width
and we have a class square:
class Square ActiveRecord::Base
def area
area = length *
Yes you were right! I was definitely on the wrong track!
The URL really helped to understand how to create nested active
records.
I still have a big problem. I have two methods in my controller SHOW
and SAVE.
In the show method I extract a lot of data from an XML into a hash
variable. In the
Hi Ken,
On Thu, Apr 28, 2011 at 9:39 AM, egervari ken.egerv...@gmail.com wrote:
I have a program I'd like to write and I'd like to get off of Java and
start using something more productive. I have played around with
Rails, and I think I could the same app in a fraction of the time.
Welcome!
thanks, guys!
i ended up just writing a method for the model that does the check..
it's something that would only happen maybe once a week.. and then,
maybe only one or two transactions.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the
On Apr 27, 2:04 pm, Kevin Monceaux ke...@rawfeddogs.net wrote:
to be the index with a list of recipes. For viewing a single recipe,
using a slug, it would make more sense for the route to be something
like:
Recipe/Beef-Brisket
instead of:
Recipes/Beef-Brisket
Is there a way to
On Apr 28, 1:18 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On 28 Apr 2011, at 13:13, Owain owain.mcgu...@gmail.com wrote:
On Apr 28, 12:57 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
mysql insert into confirmations (quote_id) values(188);
Query OK, 1 row
On Wed, Apr 27, 2011 at 8:26 AM, Chief chie...@gmail.com wrote:
What is the best and easiest way of running Ruby on Rails on a Windows
7 machine?
I really want to learn Rails, but I haven't found any easy way of
installing it on Windows 7.
Install a VM of Ubuntu or Linux and develop on
On 28 April 2011 15:47, Pale Horse li...@ruby-forum.com wrote:
amritpal p. wrote in post #995533:
Run it to generate a new migration
Then ran rake db:migrate, it created a new columns in table products with
name
price, but it didn't change the view (didn't create a field with name
price)
\Peter,
On Thu, Apr 28, 2011 at 09:15:05AM -0700, Peter wrote:
I didn't see anyone in this thread answer your actual, original
question on here so I figured I'd chime in. I'm not familiar with the
Rails 3 routes syntax yet, but I think in Rails 2.x this should be as
simple as:
Hi,
Can anybody suggest me better relationship among the above model. so that i
can connect message model with other ones.
I have four model like
1.User model - To store the user email and password
2.Actor model
3.Director model
4. Fans model
5. Message Model
Actor, Director and Fans is used
On Thu, Apr 28, 2011 at 12:38 PM, santhiya saru.santh...@gmail.com wrote:
Hi,
Can anybody suggest me better relationship among the above model. so that i
can connect message model with other ones.
I have four model like
1.User model - To store the user email and password
2.Actor model
There's some really interesting approaches in all of these emails.
I like this one the best. I haven't learned how to setup 2 databases
in rails... but is this complicated to do? I guess I could make a
database just like this person is doing, put all the thesaurus lookups
in it, and then keep it
On Thu, Apr 28, 2011 at 12:49 PM, David Kahn d...@structuralartistry.comwrote:
On Thu, Apr 28, 2011 at 12:38 PM, santhiya saru.santh...@gmail.comwrote:
Hi,
Can anybody suggest me better relationship among the above model. so that
i can connect message model with other ones.
I have four
On Thursday, April 28, 2011 12:00:37 AM UTC-6, AL wrote:
Hi,
and thanks for the information.
I have searched information about Ruby mapscript but I found only few
articles so I'm not sure about maintenance and support of Ruby
mapscript. PHP mapscripts are widely used and there is lot
Obviously
map.resources :sessions, :member = {:validate = :get}, :new = {:start =
:get}, :only = %w(create new)
creates new route for you like the one you have in new method
redirect_to start_new_session_path and return if current_user
Thanks for response. I do notice this:
form_tag
I'm looking for an freelancing webmaster who can help me with an
extremely interesting advertising start-up and work with 3 other
programmers to make a site for a start-up.
We are using Ruby on Rails for this website.
Email achang...@gmail.com if interested.
--
You received this message
I'm trying to deploy a rails 3 app to bluehost... Does anyone have
related experience??
Wow that was hard, but eventually got it working.
http://betterlogic.com/roger/2011/04/bluehost-rails-3/
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed
On Wed, Apr 27, 2011 at 6:10 PM, Jack Chu kamu...@gmail.com wrote:
I've also tried putting it in an after_initialize block and this
doesn't seem to work either.
config.after_initialize do
config.cache_store = :redis_store, APP_CONFIG['redis']
end
I think what you are looking for is
amritpal p. wrote in post #995532:
Then ran rake
db:migrate,it created a new columns in table products with name
price ,but i didnt change the view(didnt create a filed with name
price)
Migrations don't do that (you can create migrations to do all
On Thu, Apr 28, 2011 at 1:55 PM, egervari ken.egerv...@gmail.com wrote:
There's some really interesting approaches in all of these emails.
I like this one the best. I haven't learned how to setup 2 databases
in rails... but is this complicated to do? I guess I could make a
database just like
Ooo, nice. Yeah, that could solve it.
I also was doing some other research and JRuby completely slipped my
mind. Is that also a reasonable alternative too? Do you guys have any
experience using rails 3 under Jruby? Is it still easy and straight-
forward, or is the mismatch (like getting rails to
On Apr 28, 2011, at 5:04 PM, egervari wrote:
Ooo, nice. Yeah, that could solve it.
I also was doing some other research and JRuby completely slipped my
mind. Is that also a reasonable alternative too? Do you guys have any
experience using rails 3 under Jruby? Is it still easy and straight-
Actually, this might the best alternative because the way I would do
it in Java is just load the entire thesaurus into memory (all the
nouns, verbs, adj's, etc.) I didn't care too much about memory, but
I'm reasonable certain that 90% of the values were ever hit ;) I guess
it might be a bit slower
Thanks in advance for your insights
I have searched for some help on this issue but so far nothing seems to
work. I am new to rails but the code was already written.
Process is: User enters data on the form, hits submit, new search is
created. This is a search app that allows you to create
On Thu, Apr 28, 2011 at 11:18 PM, egervari ken.egerv...@gmail.com wrote:
Actually, this might the best alternative because the way I would do
it in Java is just load the entire thesaurus into memory (all the
nouns, verbs, adj's, etc.) I didn't care too much about memory, but
I'm reasonable
On Apr 28, 10:37 pm, David Mr. li...@ruby-forum.com wrote:
Thanks in advance for your insights
I have searched for some help on this issue but so far nothing seems to
work. I am new to rails but the code was already written.
Process is: User enters data on the form, hits submit, new
Hi,
Anyone have tried to use the GeoNames WebService?.
It seems to be the more practical way. I have the same request as Zhu
and just evaluating this option.
Have anyone else tried it?
Agustin
On 30 mar, 20:16, Bryan Crossland bacrossl...@gmail.com wrote:
On Wed, Mar 30, 2011 at 5:06 PM,
Why don't you just run a thesaurus app as a standalone ruby application
which you connect to via tcp sockets?
This way you only use the memory for the thesaurus once and use rails to
send requests to your standalone server?
And, if even necessary, you could look at making it multithreaded...
So if I use memcached, the memory would be used up multiple times?
nop, what is more awesome is that you can pass an ip (or an array) to the
config and it will use that (those) server's memcached so in the future
scaling your app is just a matter of putting the memcached server on
another
On Fri, Apr 29, 2011 at 1:25 AM, radhames brito rbri...@gmail.com wrote:
So if I use memcached, the memory would be used up multiple times?
nop, what is more awesome is that you can pass an ip (or an array) to the
config and it will use that (those) server's memcached so in the future
Does Rail support HTML5 Forms?
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
On Thu, Apr 28, 2011 at 7:10 PM, Andrew Miehs and...@2sheds.de wrote:
On Fri, Apr 29, 2011 at 1:25 AM, radhames brito rbri...@gmail.com wrote:
So if I use memcached, the memory would be used up multiple times?
nop, what is more awesome is that you can pass an ip (or an array) to the
config
Hi everyone,
I had deployed my one project on HEROKU and url is
http://ankit.heroku.com. It’s working fine.
But when I am trying to deployed second project , getting some fatal
error. I am write my procedure here. I have some confusion please
clear it. I had googled but not find satisfactory
Hey all,
I am looking through this example Rails app where a user session is
stored in cookie so user signs up in one rails app and navigates to
another while still being signed in as unique user. I come across this
line of code where I don't understand where some of these methods are
coming
How i escape it before the rails server process it ?
Thanks,
Ernesto
On Thu, Apr 28, 2011 at 4:58 AM, Frederick Cheung
frederick.che...@gmail.com wrote:
On 28 Apr 2011, at 03:22, Ernesto Rocha ernestorro...@gmail.com wrote:
Guys,
I'm using some AJAX on my application, but when
On Apr 28, 10:47 am, Pale Horse li...@ruby-forum.com wrote:
amritpal p. wrote in post #995533:
Run it to generate a new migration
Then ran rake db:migrate, it created a new columns in table products with
name
price, but it didn't change the view (didn't create a field with name
On Apr 28, 12:49 pm, Colin Law clan...@googlemail.com wrote:
On 28 April 2011 15:47, Pale Horse li...@ruby-forum.com wrote:
amritpal p. wrote in post #995533:
Run it to generate a new migration
Then ran rake db:migrate, it created a new columns in table products
with name
price, but
I was wondering if you could help me with a quick question on writting
polymorphic join associations.
I have User has_many Favorite(polymorphic). The user has favorite
Posts and Favorite Comments.
I want set up a direct association on User to Post
class User ActiveRecord::Base
has_many
79 matches
Mail list logo