Hi ...
i want to make link to html file.which i have in my rails application
folder.
below is my source genearted by html.
but when i click the link i get error = Firefox doesn't know how to
open this address, because the protocol (d) isn't associated with any
program.
a
Well it all in relations.
CarModel controller - has in info.
has_many :advertisments
All controller actions regarding this model, is garded by if the user
is adminnistrator.
hence in your user model, you put an bool called admin.
So all actions in the controller if garded with if @user.admin
Dear all
How can I call the UNIX environment variable in my rails project?
For example
echo $HOME
/path/to/my/home/dir
Thank you very much
Valentino
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are
On 29 Jan 2009, at 21:03, Sean McGilvray wrote:
I am sorry to hear that. I do not register any domains with them.
Mine are all done through godaddy.com
Thank you for letting me know though.
Both Hostgator and Godaddy are well known for their dubious domain
name hijacks through sister
Hi
I have a problem when I use the command
ruby script/server
in some of applications , the server dose not working
to know what I mean please
see the attachment!
How I deal with a server to see my pages
Attachments:
http://www.ruby-forum.com/attachment/3225/problem.gif
--
Posted via
Hi all,
I am using is_attachment plugin, but I will always end up with this
error:
RuntimeError in PostsController#create
BLAH
which was caused by:
version.filename = file_name_for_version(version_name)
begin
version.save!
rescue ActiveRecord::RecordInvalid
raise BLAH
end
end
What do people think about hosting it on EC2 (Amazon Cloud)? I havn't tried
it, but am looking for responses.
On Fri, Jan 30, 2009 at 1:11 AM, Peter De Berdt
peter.de.be...@pandora.bewrote:
On 29 Jan 2009, at 21:03, Sean McGilvray wrote:
I am sorry to hear that. I do not register any
Hi Petan,
That's clearly not enough code to help you. What are the validations
on you version model?
Besides that it's good practice to not user save! but only save.
ciao, tom
On Jan 30, 10:38 am, Petan Cert rails-mailing-l...@andreas-s.net
wrote:
version.filename =
Hi,
Do you really want to print links to local files?
Well, you are missing a file:// in you href attribute.
ciao, tom
On Jan 30, 10:01 am, Newb Newb rails-mailing-l...@andreas-s.net
wrote:
my actual code is%file_path.each do |f|%
a href=%= RAILS_ROOT + f % click here /a
%end%
Hi Tom,
thx for your super quick reply.
is_attachment :image_engine = :rmagick, :image_versions = { :small =
{ :cropper = [230,230] }}, :validate = {:min_width = 230, :min_height
= 230, :content_type = :image }
Cheers,
P.
--
Posted via http://www.ruby-forum.com/.
This is not Rails related, but Ruby:
ENV['HOME']
Jej
On 30 jan, 10:04, Valentino Lun rails-mailing-l...@andreas-s.net
wrote:
Dear all
How can I call the UNIX environment variable in my rails project?
For example
echo $HOME
/path/to/my/home/dir
Thank you very much
Valentino
--
Hi,
The error message is quite explicit:
- either install Rails 1.2.6.0 (copy/paste the provided command
line...)
- or ask your environment to use your current rails version (look at
environment.rb as explained)
Jej
Hi
I have a problem when I use the command
ruby script/server
in some of
I use Goldberg (http://wiki.github.com/urbanus/goldberg) to manage
this situation. It's possible to restrict access to controllers/
actions by roles. So you can forbid edit/update to normal users (or on
the other hand, forbid everything then allow only view for normal
users).
But anyway, you
Thomas r. Koll wrote:
Hi,
Do you really want to print links to local files?
Well, you are missing a file:// in you href attribute.
ciao, tom
On Jan 30, 10:01�am, Newb Newb rails-mailing-l...@andreas-s.net
thanks for the reply.i used like below.
a href=%= file://+ RAILS_ROOT + f %
Hi sir I followed your post.I got a running RoR on godaddy without a
databaseMy problem when I try to add a simple query on the database my
page only display a blank page.I really don’t what happening.
deluxe hosting linux
development machine
win xp
rails 1.1.6
ruby 1.8.6
gem 0.9.4
mysql 5
I use this approach, too. Moreover I like to separate all admin
controllers in their own namespace. Unfortunately in version 2.2
creating scaffold in namespace creates tables with admin_ (if
namespace is admin) prefix which is annoying and looks to me as a
bug.
Also in your controller you can
Johny ben wrote:
Hi sir I followed your post.I got a running RoR on godaddy without a
databaseMy problem when I try to add a simple query on the database my
page only display a blank page.I really don’t what happening.
deluxe hosting linux
development machine
win xp
rails 1.1.6
ruby
By this approach I meant the one Svend gave :-), not the one with
Goldberg.
Regards,
Bosko
On Jan 30, 11:34 am, Bosko Ivanisevic bosko.ivanise...@gmail.com
wrote:
I use this approach, too. Moreover I like to separate all admin
controllers in their own namespace. Unfortunately in version 2.2
Hi,
I have a form which lets users upload an flv file to the database, this
should then be played by the player.swf file in the public directory.
This worked fine when on the homepage as I just referenced player.swf
in the html embed tag and it worked fine.
embed
Could anyone explain me how to import TAG CLOUDS in a Ruby on Rails
Application? I am a beginner,I don't have any idea about that
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Dan Smith wrote:
I have a form which lets users upload an flv file to the database, this
should then be played by the player.swf file in the public directory.
src=/player.swf?... should work
--
Rails Wheels - Find Plugins, List Sell Plugins - http://railswheels.com
dino d. wrote:
I've dramatically improved my SQL performance with eager loading, but
the problem is, it kills the :select directive because it generates
its own (it ONLY selects the table fields and eager loaded table
fields). Is there a way around this? I have some left outer joins in
Hello everyone,
I want to fetch some (5-10) RSS feeds from another server. I plan to
fetch the RSS feeds asynchronously and store them on the hard disk
every 30 minutes so I can read them from there on every request. (To
treat the remote server with care and to avoid longer page generation
not the one with
Goldberg.
You should ;)
I think it's better to group the security concerns in the same place
(ie. in golberg) rather than spread them amongs different
before_filters.
But whatever, the both rely on the skills of the coder!
Jej
hello list
I have a problem with form_for and :onsubmit
this is may code
div id=note
% javascript_tag do %
function valor(){
alert('aqui');
}
% end %
% form_for :accion, :url={:controller= accions, :action=
anadir}, :html={:onsubmit=valor();} do |f| %
.
%= f.submit Go %
%end %
/div
Rob Biedenharn wrote:
'type' is used by ActiveRecord to indicate Single Table Inheritance.
That's probably tripping you up (esp. since changing the name
eliminates the issue)
As far as I know this is only the issue when you name a column type
-which is not what I've done here.
Thanks
Julian Leviston wrote:
At the ruby level, type is an alias of
class, too (sorta), so it's gonna have some major issues with that word.
Sent from my iPhone
On 30/01/2009, at 4:20 AM, Rob Biedenharn r...@agileconsultingllc.com
Yes I know - but why doesn't
belongs_to :blah, :class_name =
On Jan 29, 2009, at 7:33 PM, Scott Kulik wrote:
Scott Kulik wrote:
I can do sorting by a single field like the following:
@users.sort! { |a,b| a.name.downcase = b.name.downcase }
but what if i want to sort by user.name and then user.rank?
what's the best way to do this?
thanks!
just
Hi all!
I'm trying to do the following thing:
class Show ActiveRecord::Base
has_many :pools
has_many :tickets, :through = :pools
end
class Pool ActiveRecord::Base
belongs_to :show
has_many :tickets
end
class Ticket ActiveRecord::Base
belongs_to :pool
end
Now with an instance of
+1 for Slicehost
Great service and fast servers.
On Jan 30, 1:02 am, Michael Kahle rails-mailing-l...@andreas-s.net
wrote:
I have multiple domains I want to move to a rails host. I would like
full SSH access to the servers, ftp, and a knowledgeable support staff
that I can get on the phone.
I'd suggest taking a quick look at Slicehost. www.slicehost.com
I've just set up a VPS there a couple of days ago and so far I'm
really impressed with them. It's also relatively cheap compared to
other services and you get root SSH access to your Slice (thats how
they call the VPS). You can
Rasmus Nielsen wrote:
Yes I know - but why doesn't
belongs_to :blah, :class_name = ItemType
... not work then?
Does it work when you explicitly define the foreign_key?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this
Forgot to mention that I have an after_save that uses Pool. Here it goes
wrong..
Now I have to figure out a way to do the after save correctly.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Martijn:
I had similar odd symptoms a while back. It turned out that I had two
different versions of both Ruby and RubyGems installed and was trying
to mix and match between them without realizing it.
Older versions of Ruby and Gem want to live in /usr, but newer
versions seem to want to live
Hi,
How change rails version ?
--
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 to
Problem solved:
I had the after_save before the association declaration. Defining them
after the associations solved it.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
i am currently working on a function that adds markers to a map..
without getting into too much detail, the map is initially in a
display:none div.. so, i had to do a few things to get it to show up
correctly..
initially, i needed to add markers when the user clicked a link. i did
this with a
Either figure out the format and just write it out, or visit
http://www.poi-factory.com/node/6675
and get a tool that will do the csv=ov2 conversion and just write out
the csv with ruby (and FasterCSV)
-Rob
On Jan 30, 2009, at 10:46 AM, jef wrote:
My problem is to make ov2 file.
On Jan 30, 5:50 am, attila.gyor...@gmail.com
attila.gyor...@gmail.com wrote:
I'd suggest taking a quick look at Slicehost.www.slicehost.com
Yet another 1+ for Slicehost. They were recently bought by RackSpace,
but nothing has changed operationally. Great systems and service!
Try the acts_as_taggable_on plugin/gem and the associtated tag_cloud
helper.
Acts_as_taggable_on at github:
http://github.com/mbleigh/acts-as-taggable-on/tree/master
(sparse) documentation on the tag_cloud helper:
http://dev.af83.com/ruby/playing-with-acts-as-taggable-on/2008/02/25/
I
This is exactly what I was looking for.
Thank you,
Sean McGilvray Sarena Byers
Director
Identity Theft Specialist
Pre-Paid Legal Service's, Inc. NYSE:PPD
Phone: 760-486-1019
smcgilv...@prepaidlegal.com
http://www.transferhome.net
On Thu, Jan 29, 2009 at 6:59 PM, anton effendi
Is it possible to do something like this?
tables = Array[ Xxx, Yyy, Zzz]
for table in tables
results = table.find(:all, :conditions = [.
end
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are
I would try it and see. It will either work or not.
2009/1/30 James Bond rails-mailing-l...@andreas-s.net
Is it possible to do something like this?
tables = Array[ Xxx, Yyy, Zzz]
for table in tables
results = table.find(:all, :conditions = [.
end
--
Posted via
We host on EC2. I think it beats anything else for dev+test
environments (since you can create and tear down instances very easily
and pretty quickly, thanks to the various projects out there that let
you do this --see [1]).
For production, my impression is that it's more expensive than some
James Bond wrote:
Is it possible to do something like this?
tables = Array[ Xxx, Yyy, Zzz]
for table in tables
@records = table.camelcase.constantize.find(:all, blah blah blah)
end
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You
Am I totally crazy, is there a reason I can not find the
paginating_find plugin anywhere?
Everyone points to cardboardrocket.com but that server has been down,
apparently perm.
http://svn.cardboardrocket.com/paginating_find
I need to implement pagination and really need the plugin. Can
Hello,
In my application.html.erb layout I have a reference to a .swf (flash
movie) file that I want to embed. I put the swf file in the
public/flash directory (I created the flash folder).
My question is how do I get a reference to the public folder that
rails created from within a view
I don't see a way to create a single URL in a collection and then have
routing dispatch to the appropriate method based on the HTTP method.
map.resources :packages, :collection={ :search=:get }
Gets me half way there, but I can see a way to say that I want the
POST to go to the do_search
/public is the root of the public site... so just
embed src=/flash/mymovie.swf width=400 height=163
On Fri, Jan 30, 2009 at 10:43 AM, Nebs Petrovic
rails-mailing-l...@andreas-s.net wrote:
Hello,
In my application.html.erb layout I have a reference to a .swf (flash
movie) file that I want
Has anyone found a Ruby library to implement RFC-1734, the POP3 AUTH
command? (I cannot be certain tyet, but it seems that POP3 AUTH is
also supported as AUTH in IMAP4.) Chilkat seemingly offers a solution,
albeit Windows only. Any open source stuff?
Martin
Does it make sense to make a singleton class in Rails? I made a
singelton class but everytime I do model.instance.id in some controller
it is always different. Is this because it is in development mode so the
classes get reloaded each time but in production this would not be the
case?
--
Posted
Arthur Chan wrote:
Hi guys,
I don't know if this question is proper to post here. But I think it is
related to every developer, so I post.
I am using RoR for developments more than a year. We are using Bugzilla.
We do unit, funcitonal and watir tests.
Do you pair program? Use
I am using RoR for developments more than a year. We are using Bugzilla.
We do unit, funcitonal and watir tests.
Do you pair program? Use test-driven development? And do you make the fewest
possible edits between successful test runs? Do you test incrementally, where
only suites edited
The short and sweet: you can not, should not, and will not try to save
information in memory in your Rails environment across web requests.
If you need to save data, use a database, use the session, use flat
files on the disk. Expecting Ruby to just remember is pointless here
because 1) yes,
Aa Sh wrote:
Phlip, Peter, and Bharat,
Thank you for advises and your time!
I did it!
--
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
Thanks jason. Question on part 2)
Say I have only 1 production box with 4 mongrels on it. Wouldnt there
only be 4 rails processes? Or does each mongrel have many rails
processes running? Do you know of any documentation that explains all of
this? Thanks
Jason Roelofs wrote:
The short and
Hi,
I don't have a solution for you but in general searches are GET and
never POST. I don't know where this nonsense comes from but
it's breaking the principles behind the HTTP.
Did you try :any instead of :post ?
ciao, tom
On Jan 30, 7:46 pm, MaggotChild hsomob1...@yahoo.com wrote:
I don't
..but in general searches are GET and
never POST. I don't know where this nonsense comes from but
it's breaking the principles behind the HTTP.
Well I don't disagree with this paradigm, but the point is Rails seems
to not allow one to set up a route like the defaults provided by
Rails deployment is a huge subject, though in short if you were to use
Mongrel you'd have your HTTP server in front (Apache / nginx / etc)
proxy out to a cluster of mongrels. Thus, each mongrel is a Rails
process.
Personally, I'd say to forego Mongrels / Thins / etc and check out
Passenger:
Hi,
I think will_paginate is the new rockstar for more than a year now.
But here's your fav:
http://github.com/alexkwolfe/paginating_find/tree/master
On Jan 30, 7:36 pm, Chad carim...@gmail.com wrote:
Am I totally crazy, is there a reason I can not find the
paginating_find plugin anywhere?
If I have table user (id, firstname, lastname, age, city)
And form: textboxes for firstname, lastname, age and select for city
Is it possible to auto complete form? Not only firstname or lastname,
but full form?
So if I enter lastname, and there is only one user with this name, so it
auto
Freddy Andersen wrote:
In Rails if the form field is empty it will submit an empty params
value.. Thats how it works by default.
Maybe an example would be better?
If you had two inputs, i1 and i2 and i1 had the word here and i2 was
empty when you press submit you get this back to you
Hi I'm using Fetcher with MMS2R as described in the Peepcode mini-
book.
After I start Fetcher I get the following error a few seconds later:
$ RAILS_ENV=development ruby script/mail_fetcher start
Starting MailFetcherDaemon
$ /usr/local/lib/ruby/1.8/net/imap.rb:288:in `shutdown': Socket is not
I solved this issue with hidden fields. You must put a hidden field
with the SAME NAME with the value = '0' (or whatever you want to mean
unchecked). This sets a default of '0' which is overwritten by the
checkbox.
However, the hidden field MUST be after the checkbox for it to work,
which
Well, you only need to tell if the file exists if you care about that.
In dev, you may not. Try something like:
def wrapped_image_tag(image_name, options={})
image_name = 'placeholder.png' if `hostname` =~ /local/
image_tag(image_name, options)
end
You may wind up with a page of
Hello,
there is any way to add a partial using insert_html using visual_effect
to do it?
(inset_html and visual_effect at the same time.)
I want to do something like:
render :update do |page|
page.insert_html.visual_effect :bottom, :invoice_items, :partial =
invoice_item, :object =
James Bond wrote:
If I have table user (id, firstname, lastname, age, city)
And form: textboxes for firstname, lastname, age and select for city
Is it possible to auto complete form? Not only firstname or lastname,
but full form?
So if I enter lastname, and there is only one user with
I had been looking for several months to move my sites (both RoR and
old-fashioned) off of my home servers and finally pulled the trigger
when I read that the Rails Rumble is hosted by http://www.linode.com/
. It's funny that I hadn't heard of them until then given how much
searching I had done
Under windows, I am able to set up one virtual host that works with
mongrel no problem. The issue is when I set up additional ones I
cannot get to them. I look in the log file of the first app and it is
trying to go there.
Does anyone know how to set up multiple virtual hosts with rails?
Hi,
This morning I sat down and nutted out a way of getting Rails 2.3 to
play nicely with Ruby 1.9.1. Here's a guide so you can do the same:
http://frozenplague.net/2009/01/ruby-191-rubygems-rails/
-
Ryan Bigg
Mocra - Premier iPhone and Ruby on Rails Consultants
w - http://mocra.com
e -
Ryan Bigg wrote:
Hi,
This morning I sat down and nutted out a way of getting Rails 2.3 to
play nicely with Ruby 1.9.1. Here's a guide so you can do the same:
http://frozenplague.net/2009/01/ruby-191-rubygems-rails/
-
Ryan Bigg
When installing the latest Rubygems 1.3.1 it will copy
Dear all,
I have implemented a modal window for selection of user. How i can
implement pagination for modal window. I have used the following
controller method for displaying user in modal window
def user_search
@user_list = UserInfo.find( :all,:page = {:current =
@page_current,
hi
Is it possible to use auto complete with text_field _tag.
Kindly let me know
Cheers
--
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
Hi,
I'm using Rails 2.2.2. I noticed that creating two references to the
same database ActiveRecord object, then deleting with one of them,
followed by saving with the other, true is returned, but no new record
is actually saved. e.g.:
doc=Document.new(:title = sam's speciality)
doc.save
doc.id
Hi all,
I've got a simple problem and I am wondering if it can be solved.
In my code I use Hash params name including white spaces (coming from
legacy database). They works well in my View, but I am not able to
properly use them later in my controller.
For instance, in my view I have:
input
75 matches
Mail list logo