Thanks for the replies guys, especially you Darrik. I actually did
have a look at the options to map.resources but was a little
overwhelmed. The tutorial I've been trying to complete merges the NEW
and EDIT actions to show how its possible to put all those actions
into a single method but in doi
Frederick Cheung wrote:
> On 12 Sep 2008, at 12:32, Raju Aralikatti wrote:
>
>>
>> hi all,
>> We have a very big application, We started coding in rails 1.1.6,
>> Now we
>> want to migrate our rails application from the older 1.1.6 version to
>> the latest released version, Can anyone please gi
On Sep 14, 12:48 pm, Richard Mr <[EMAIL PROTECTED]>
wrote:
> Hello
>
> I have an articles controller and an admin/articles..routes.rb:
>
> map.resource :articles
>
> map.namespace :admin do |admin|
> admin.resources :articles
> end
>
> Normally I could refer to the admin_article_path
Hello
I have an articles controller and an admin/articles..routes.rb:
map.resource :articles
map.namespace :admin do |admin|
admin.resources :articles
end
Normally I could refer to the admin_article_path series of
routes...edit_admin_article_path(asdf) for example - but a link_to
bingo bob wrote:
>
>
> Darrick,
>
> That's great thanks, I tried this before (or something very similar and
> it worked)...Here's the problem though...
>
> That show action works your way from the collection select drop down...
>
> However
> When I do it this it brakes something else (th
bump...
--
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 rubyonrails-talk@googlegroups.com
To unsubscribe fr
Hi Dave,
I can't explain why it happens, but I noticed the same thing while
debugging a module of my own. After I did the reload!, I needed to
require the file again. So if my file as custom_validations.rb, it would
look like
reload!
require 'custom_validations'
and then it worked.
Peace.
-
chris wrote:
> I started out with a normal scaffold for the USERS table. I changed
> the index view to be list.html.erb but the url: '/users/list' returns
> an 'unknown action' error. '/users/list/:id' also returns an 'unknown
> action' error. I've also merged both the edit and new views into th
chris wrote:
> Hey i took your advice and took a closer look at the code scaffold
> generates for my NEW & EDIT views and it seems that form_for takes the
> same argument for edit and new which is the object itself, in this
> case @category.
>
> I used the form_for and it worked. can you explain
Frederick Cheung wrote:
> On 13 Sep 2008, at 21:30, Michael Lavrisha wrote:
>
>> from params in the controller but I don't know how to access it in the
>> model.
>
> I was thinking along the lines of
>
> def some_action
>@record = Record.find[:id]
>@record.some_attribute = params[:recor
rename the action in your controller
On Sep 13, 4:16 pm, chris <[EMAIL PROTECTED]> wrote:
> I started out with a normal scaffold for the USERS table. I changed
> the index view to be list.html.erb but the url: '/users/list' returns
> an 'unknown action' error. '/users/list/:id' also returns an '
Please read http://frozenplague.net/2008/01/06/restful-routing-an-overview/
to gain a better understanding of restful routing.
I also don't recommend merging the new action with the edit action
because you may run into problems later on
-
Ryan Bigg
Freelancer
Skype: radarlistener
MSN & G
i have a rails app that tests fine with "rake spec" but gets a
segmentation fault when "rake spec:rcov" is run.
i am on windows xp, ruby 1.8.6, rails 2.1.1, mysql 5
my app is at
http://github.com/scottnj/test_blog/tree/master
so maybe someone can try to replicate my error so i know if the
problem
What Christian means is something like:
Put this in your app/views/layouts/application.html.erb:
<%= yield :refresh_tag %>
And then you will need to call this in a view:
<% content_for :refresh_tag do %>
>
<% end %>
But this needs to be done in a view... unlike the requested
before_filter
Thanks for the tip. I just tried it but unfortunately I got:
the symlink() function is unimplemented on this machine
I'm working on a Windows machine.
Thanks anyway.
On Sep 13, 7:32 pm, Christian Rishøj <[EMAIL PROTECTED]> wrote:
> By default only the public directory is exposed to the web. If
You could use the content_for pattern. Set the header as he content in
your filter, and output it in your view.
Christian
On Sep 13, 2:38 am, David <[EMAIL PROTECTED]> wrote:
> Do you know of any way for me to stick a meta tag in using a
> before_filter or after_filter or around_filter?
>
>
>
By default only the public directory is exposed to the web. If you
have content living outside of this place you to somehow expose it in
the web scope. You might make a symlink, or make a other virtual host
for the images and designate this with asset_host.
Christian
On Sep 13, 7:52 pm, pepe <[
Check the output of "rake routes" to see which routes are recognized.
When you are sure your URLs follow the expected URLs, check that your
actions correspond. Keep an eye on the log file to see what's going
on.
Christian
On Sep 13, 10:16 pm, chris <[EMAIL PROTECTED]> wrote:
> I started out wit
Rebutlah peluang emas ini..rm2000 masuk terus ke dalam akaun bank anda..
Usah risau pasal modal yang besar..kami sedia mambantu anda...
Kini modal hanya rm97 permulaan yang kecil tapi anda mampu mendapat pulangan
yang berganda..
IKUTILAH CARA DAN LANGKAH MENJADI FOREX TRADER,
Penerangan bermula dar
I have the same question as the other two, what additional information
are you trying to add to this drop-down?
On Sep 12, 1:57 pm, Shandy Nantz <[EMAIL PROTECTED]>
wrote:
> I need to populoate a drop-down with values from two tables. Currently I
> have this code which just pulls from one table:
On 13 Sep 2008, at 21:30, Michael Lavrisha wrote:
>
> Frederick Cheung wrote:
>> On Sep 12, 8:50�pm, Michael Lavrisha <[EMAIL PROTECTED]
>> Your best bet is
>> to pull out of the hash the value that needs to be set first and set
>> it yourself.
>>
>> Fred
>
> How do you access the hash from the
Frederick Cheung wrote:
> On Sep 12, 8:50�pm, Michael Lavrisha <[EMAIL PROTECTED]
> Your best bet is
> to pull out of the hash the value that needs to be set first and set
> it yourself.
>
> Fred
How do you access the hash from the form? I know you can just get it
from params in the controller
On Jul 24, 10:22 am, Christian Ls <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I have written an RSS builder template for my Rails app. Everything
> works great, but now I want to put some HTML code into the RSS Item
> description tag.
> Any idea on how to do that? It seems that Builder automatically es
Jim, here's the bugs I've reported to rails.lighthouseapp.com
http://rails.lighthouseapp.com/projects/8994/tickets/611-cannot-write-certain-binary-data-to-postgresql-bytea-columns-in-2-1-0
http://rails.lighthouseapp.com/projects/8994/tickets/861-fix-for-a-transaction-problem-with-change_column-on
I am also very interested in how to do that.
--
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 rubyonrails-ta
I started out with a normal scaffold for the USERS table. I changed
the index view to be list.html.erb but the url: '/users/list' returns
an 'unknown action' error. '/users/list/:id' also returns an 'unknown
action' error. I've also merged both the edit and new views into the
manage.html.erb whi
roschler wrote:
> Hello everyone,
>
> please post the most popular IDE tools that people are
> using and that are being requested for in Rails/Help Wanted requests
> or a link to a web page or article that delineates them. If 3rdRail
> is not, please post the URL of a forum or group where I can
Prawn : Fast, Nimble Ruby PDF Generator
Release Version 0.2.0
= Description:
Prawn is a new pure Ruby PDF generation library, with the long term
goal of providing a suitable replacement for PDF::Writer. It is being
developed under the auspices of the Ruby Mendicant project with
copious help fro
On Sep 14, 3:01 am, roschler <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I have to decide whether or not to re-up my subscription to Codegear/
> 3rdRail. I bought a fully licensed copy back in Sep/2007 and the
> subscription is nearly up. I know it this may sound funny but I
> finally got t
Hello everyone,
I have to decide whether or not to re-up my subscription to Codegear/
3rdRail. I bought a fully licensed copy back in Sep/2007 and the
subscription is nearly up. I know it this may sound funny but I
finally got the chance to sit down and start learning it this week
despite the f
Warrenk wrote:
> I am new to the Ruby on Rails programming system and I just purchased
> Railspace but I cannot pull up this URL needed to progress further
> through the book, It is telling me it is an invalid URL, what should I
> do?
You meant http://localhost:3000/ with a colon, right?
The co
Warren,
It is -
http://localhost:3000
That's a colon, not a slash : 3000 is the port on which Rails is listening.
Phil
On Saturday 13 September 2008 18:11:34 Warrenk wrote:
> I am new to the Ruby on Rails programming system and I just purchased
> Railspace but I cannot pull up this URL needed
I believe you have the address wrong. Shouldn't it be a colon (:)
instead of a slash (/) between localhost and 3000?
i.e.: http://localhost:3000/
Pepe
On Sep 13, 1:11 pm, Warrenk <[EMAIL PROTECTED]> wrote:
> I am new to the Ruby on Rails programming system and I just purchased
> Railspace but I
I am new to the Ruby on Rails programming system and I just purchased
Railspace but I cannot pull up this URL needed to progress further
through the book, It is telling me it is an invalid URL, what should I
do?
--~--~-~--~~~---~--~~
You received this message becau
> Uhmmm, 2MB RAM?
sorry, 2GB
--
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 rubyonrails-talk@googlegroups
http://www.philsergi.com/2007/10/actsasmessageable-plugin-released_04.html
my post was alittle premature from a good search. lt me know if anyone
finds any good resources on implementing this!
tashfeen.ekram wrote:
> I have not had luck in finding a messaging plugin that allows for the
> convers
Hello.
I'm writing an application that uses images stored in the same server
but outside of the application directory. I have tried many things but
nothing worked and found nothing really useful anywhere.
What can I do so the image_tag helper finds the images I need?
Thanks a lot.
Pepe
--~--~-
On Sep 13, 6:35 pm, Peter Alvin <[EMAIL PROTECTED]>
wrote:
> I'm running latest RoR/Ruby/MySQL 5... I can reproduce at will.
>
> Any idea how rake db:migrate could cause Vista to crash?
>
> Pete
>
> REF:
> Windows Vista Home Premium (SP1), 2MB RAM, Dell Inspiron 1501
> Ruby 1.8.6, Installer 186-26
it turns out mysql was installed in a safe mode or something
i found this
http://kb.helpdeskpilot.com/knowledgebase.php?act=art&article_id=124
Now, open the my.ini file located at c:program files/MySQL/MySQL
Server X.x/my.ini.
Add a # at the begining of the line: sql-
mode="STRICT_TRANS_TABLES,NO
yes thats what i was looking for. thx.
--
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 rubyonrails-talk@goo
On Sep 12, 5:12 pm, Chris Richards <[EMAIL PROTECTED]>
wrote:
> Hi
>
> I have a SupplierBreakdownReport class that uses a rails view to
> generate a html report, which then is converted into a PDF, as follows :
>
> class ReportGeneratorController < ApplicationController
>
> ..
>
> def supplier_bre
On Sep 13, 4:53 am, Aryk Grosz <[EMAIL PROTECTED]>
wrote:
> I've been looking on the internet for the feature in rails where you can
> specify an association extend module on the actual class.
>
> So for example
>
> class Printer < AR::Base
> some_association_extend_method_that_i_cant_figure_out
On Sep 12, 5:28 pm, mattwynne <[EMAIL PROTECTED]> wrote:
> I know I can use a namespace on the map passed into the block for
> ActionController::Routing::Routes.draw because I've done that with
> some Admin:: controllers.
>
> What I want to do is something similar with controllers for resources
On 13 Sep 2008, at 17:48, Mozmonkey wrote:
>
> Woops, the file was named wrong. Instead of HelloWorld.rb it needed
> to be hello_world.rb.
>
> Class.subclass only seems to show classes that have
> been instantiated, so I can't quite get a list of subclasses without
> creating a new instance of
Woops, the file was named wrong. Instead of HelloWorld.rb it needed
to be hello_world.rb.
Class.subclass only seems to show classes that have
been instantiated, so I can't quite get a list of subclasses without
creating a new instance of all of them.
So how would I loop through the files in the
Hey i took your advice and took a closer look at the code scaffold
generates for my NEW & EDIT views and it seems that form_for takes the
same argument for edit and new which is the object itself, in this
case @category.
I used the form_for and it worked. can you explain again why it
works? tha
I have not had luck in finding a messaging plugin that allows for the
conversatoin concept like g-mail/outlook. That is each message is put
into a conversation and you can see all of the messages as part of one
conversation.
it does not seem like it would be too difficult to take an existing
mess
On 13 Sep 2008, at 17:48, Bharat Ruparel wrote:
> Thanks Peter. I restarted the cluster. The speed difference is
> noticable. I have looked at the logfiles and they are clean. No
> mention of mysql gem though.
That's what it should be. If you don't have the native driver
installed, the log
Thanks Peter. I restarted the cluster. The speed difference is
noticable. I have looked at the logfiles and they are clean. No
mention of mysql gem though.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you
Thanks Fred - I just solved the problem by passing the xml variable to
the to_rss method, and now I feel a bit silly for asking! :)
On 13 Sep, 16:14, Frederick Cheung <[EMAIL PROTECTED]> wrote:
> On 13 Sep 2008, at 16:11, Adam wrote:
>
>
>
>
>
> > My question is, what do I need to include in the
On 13 Sep 2008, at 16:11, Adam wrote:
>
>
> My question is, what do I need to include in the model in order to use
> the xml builder? I want to write in blog.rb
>
> def to_rss
>xml.item do
> xml.titleself.subject
> xml.linkblogs_path
> xml.description
Hi all,
I have an application that produces an RSS feed of blog posts. To do
this, I have a file rss.rxml that contains code like this:
@blogs.each do |blog|
xml.item do
xml.titleblog.subject
xml.linkblogs_path
xml.description blog.body
xml
thanks so much..
but i wonna create a menu with all categories in tables..
for example:
Bio (3) -- numeber 3 are articles in table..with category = bio
Ruby (10) -- same as above but with category = ruby
ok?
In PHP I can have this result with a query..
I want this with RoR..
With your method is
On 13 Sep 2008, at 13:51, Bharat Ruparel wrote:
> The RoR app that I have inherited was running without MySQL native
> drivers on Ubuntu. I just installed MySQL gems to get the benifit of
> using Native drivers. However:
>
> 1. How do I know that the app has switched to using the native
> dr
I'm curious if you can be more detailed on the bugs you've found with
ActiveRecord involving PostgreSQL. I've used PostgreSQL with Rails
for several projects and have had only 1 problem relating to using
"infinity" with timestamps that was in fact rather easy to work
around. I've used ActiveReco
On 13 Sep 2008, at 11:25, Mozmonkey <[EMAIL PROTECTED]> wrote:
>
> For some reason that is not working. Here's the load_paths line in
> the environment file:
>
> config.load_paths += %W( #{RAILS_ROOT}/widgets )
>
What's happening?
Fred
> And the main widget model (widget.rb):
>
> class Widget
Hi,
Ok i fixed that too. I just add in my controller action an redirection
to an action, like so:
class ContactController < ApplicationController
def index
end
def send_mail
Emailer::deliver_contact_email(params[:email])
redirect_to :action => 'index'
end
end
That works grea
Hi,
Thank you for your fast response. Ok i fixed the issue. The problema
was that i was using smtp as a backend in the instruction:
ActionMailer::Base.delivery_method = :smtp
Our server uses sendmail, i just changed to this:
ActionMailer::Base.delivery_method = :sendmail
and it works perfec
On 13 Sep 2008, at 13:34, Nikita Petrov wrote:
>> That is because you are not using the rails way of working. If you
>> pass custom sql requests to the database, the return type will always
>> be a string and you need to convert the value yourself (.to_i).
>
> It's rather curiously, because Oracl
The RoR app that I have inherited was running without MySQL native
drivers on Ubuntu. I just installed MySQL gems to get the benifit of
using Native drivers. However:
1. How do I know that the app has switched to using the native drivers
instead of the slower ruby drivers.
2. It is an app ru
Peter De Berdt wrote:
> That is because you are not using the rails way of working. If you
> pass custom sql requests to the database, the return type will always
> be a string and you need to convert the value yourself (.to_i).
It's rather curiously, because Oracle driver for Ruby On Rails solve
On 13 Sep 2008, at 12:53, Nikita Petrov wrote:
> I have a trouble with MySQL select result fields' data type
> definition -
> all fields' type is always string. For example, I call this code:
>
> ActiveRecord::Base.connection.select_all('SELECT COUNT(*) count FROM
> table').first['count']
>
> T
any ideas, does my show action need to change, or the collection select,
OR the params passed from when I move to the show action from the edit ?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
I have a trouble with MySQL select result fields' data type definition -
all fields' type is always string. For example, I call this code:
ActiveRecord::Base.connection.select_all('SELECT COUNT(*) count FROM
table').first['count']
The result will always string, but it must be integer. There is t
Woops, the file was named wrong. Instead of HelloWorld.rb it needed
to be hello_world.rb. Now Class.subclass only shows classes that have
been instantiated, so I can't quite get a list of subclasses without
creating a new instance of all of them.
So how would I loop through the files in the wid
I'm running latest RoR/Ruby/MySQL 5... I can reproduce at will.
Any idea how rake db:migrate could cause Vista to crash?
Pete
REF:
Windows Vista Home Premium (SP1), 2MB RAM, Dell Inspiron 1501
Ruby 1.8.6, Installer 186-26
MySQL 5
MySQL Connector Net 5.2.2
--
Posted via http://www.ruby-forum.c
Darrick,
That's great thanks, I tried this before (or something very similar and
it worked)...Here's the problem though...
That show action works your way from the collection select drop down...
However
When I do it this it brakes something else (the show action after I've
editted a for
For some reason that is not working. Here's the load_paths line in
the environment file:
config.load_paths += %W( #{RAILS_ROOT}/widgets )
And the main widget model (widget.rb):
class Widget < ActiveRecord::Base
set_table_name :widget
#
# Get a list of widgets
#
def self.get_widgets
Louis I use postgres with rails and I'll give you some tips
rails doesn't create databases for you out of the box (as far as I
know.) You need to create the databases yourself, or write some code
in your app to create them for you.
Installing the postgres driver on windows is tricky. There exi
On Sep 13, 10:40 am, Erwin <[EMAIL PROTECTED]> wrote:
> Got it, the widget is using Prototype 1.6.0 where the display function
> IS defined :
>
> display: function(element, bShow) {
> if(bShow) { Element.show(element); } else
> { Element.hide(element); }
> },
>
> but my Rails app is usin
fRAnKEnSTEin wrote:
> Hi, i am trying to send an email using RoR version 2.1.0 but i get
> some errors. I have this configuration:
>
> 1- In config/eviroment.rb, at the very end of my file:
>
> ActionMailer::Base.delivery_method = :smtp
>
> ActionMailer::Base.smtp_settings = {
>:address =>
On Sep 13, 10:25 am, fRAnKEnSTEin <[EMAIL PROTECTED]> wrote:
> Hi, i am trying to send an email using RoR version 2.1.0 but i get
> some errors. I have this configuration:
>
> 1- In config/eviroment.rb, at the very end of my file:
>
> ActionMailer::Base.delivery_method = :smtp
>
> ActionMailer:
bingo bob wrote:
>
> Anyone mind helping with he following, whatever I do I can't get it to
> work quite right, I want the selection dropdown to show a list of
> enquiries maybe by Enquiry.firstname and when selected the show action
> to display the enquiry, I know this should be mega easy but I
Got it, the widget is using Prototype 1.6.0 where the display function
IS defined :
display: function(element, bShow) {
if(bShow) { Element.show(element); } else
{ Element.hide(element); }
},
but my Rails app is using Protoype 1.6.0.2 where this function IS NOT
defined, is it a bug or no
Hi, i am trying to send an email using RoR version 2.1.0 but i get
some errors. I have this configuration:
1- In config/eviroment.rb, at the very end of my file:
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.domain.com",
:port => 25,
anyone? I just need a basic dropdown which passes the id of the selected
enquiry.
--
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
I am trying to incorporate a js widget into my webapp...
the html file widget is running fine in my browsers (FF3, Safari
3...) , the js lib loading is defined as folloing :
I tried to run it into my Rails app as it (just changing the
directory, and adding the dragdrop.js I need)
I g
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For
On Sep 12, 8:50 pm, Michael Lavrisha <[EMAIL PROTECTED]
s.net> wrote:
> hello
>
> I have a nested resource that needs the id of its parent when it is
> being created. This parent id is stored in a hidden attribute in the
> form (we'll call this attribute A). I need this parent id to process the
Fred, you're everywhere, man! And, yes, you're spot on...
> Could this be conflicting with the timezone stuff in rails 2.1 ?
The problem is that there is no problem. Apparently Rails 2.1 already
handles daylight savings properly (tzinfo gem is already bundled), and
using tzinfo_timezone just scr
Anyone mind helping with he following, whatever I do I can't get it to
work quite right, I want the selection dropdown to show a list of
enquiries maybe by Enquiry.firstname and when selected the show action
to display the enquiry, I know this should be mega easy but I can't get
it to work with c
chris wrote:
> i'm having a routing problem with my UPDATE action. I've pasted my
> CATEGORIES controller and view below. I ran scaffold for categories
> and i consolidated everything into a single view so that I could show
> list, create new, edit, destroy all from a single page. my create,
>
Darrik Mazey wrote:
> I offer this update because I'm still in need of assistance but also in
> case anyone else has been looking for a similar solution. Hopefully
> this update will be of assistance.
>
> I've managed to find in the rails source the method
> ActionController::Routing::Routes.
Darrik Mazey wrote:
> Hello,
>
> I'm trying to find a programmatic way to get access to the routing table
> such that I can discover what controller, action, etc., a given path
> would map to. I could parse the path string myself, but I'd like to be
> able to access controllers for non-standar
84 matches
Mail list logo