Hi,
I recently had to deal with nested form, and I found quite complex to
handle it with my situation.
I have a list of choices and want to allow the user to use some from a
predefined list, by using checkboxes.
I posted the question on Stack Overflow a few days ago, but nobody
answered yet.
hello everybody , I am a newbie to Rails' world.
I just start reading the book Agile web Development with rails
one question.
How can I add a new view to a exist controller?
we can use
code:
rails generate controller controller_1_name [view_1_name
view_2_name]
however. if I wanna add a
On 3 September 2010 11:35, Alfredo Bonilla li...@ruby-forum.com wrote:
Hi,
I have a select in my form:
%= select @issue_type, name, @issue_types.collect {|p| [p.name,
p.id]} %
What I need to do is execute a method passing the value selected in the
combo. I've tried lot of things, but I
On Friday 03 September 2010, Marnen Laibow-Koser wrote:
Marnen Laibow-Koser wrote:
Well, you learn something new every day! I found the Ambiguous
Groups article on the Web and found that the behavior I thought was
standard -- returning the first value in the case of multiple values
-- is
I have a database of people that have used a local foodbank. The
problem I'm having now is that i need a way to put 2 collections into
one variable, like rails does it for partials. I want a variable
@oxford that does a Household.find_all_by_zip('01540'). This is no
problem.
The trouble comes
On 4 September 2010 09:14, Michael Schuerig mich...@schuerig.de wrote:
On Friday 03 September 2010, Marnen Laibow-Koser wrote:
Marnen Laibow-Koser wrote:
Well, you learn something new every day! I found the Ambiguous
Groups article on the Web and found that the behavior I thought was
I got the following error when try to install rails-3.0.0 on my Ubuntu
box. Can anybody help?
dw...@dwang-bj-ws:~/Projects$ sudo gem install rails
Successfully installed rails-3.0.0
1 gem installed
Installing ri documentation for rails-3.0.0...
File not found: lib
dw...@dwang-bj-ws:~/Projects$
On Saturday 04 September 2010, Colin Law wrote:
On 4 September 2010 09:14, Michael Schuerig mich...@schuerig.de
wrote:
On Friday 03 September 2010, Marnen Laibow-Koser wrote:
Marnen Laibow-Koser wrote:
Well, you learn something new every day! I found the Ambiguous
Groups article on
On Sep 4, 5:16 am, John Anderson jno...@gmail.com wrote:
hello everybody , I am a newbie to Rails' world.
I just start reading the book Agile web Development with rails
one question.
How can I add a new view to a exist controller?
we can use
code:
rails generate controller
On Sep 4, 9:18 am, Bob Smith bsm...@gmail.com wrote:
I have a database of people that have used a local foodbank. The
problem I'm having now is that i need a way to put 2 collections into
one variable, like rails does it for partials. I want a variable
@oxford that does a
On Sep 4, 5:38 am, boblu bobl...@gmail.com wrote:
I want to use rake background task in rails like this
system(cd #{Rails.root} RAILS_ENV=#{Rails.env} rake abc:def --
trace 21 #{Rails.root}/log/rake.log )
This is ok in development environment, but will not work in production
mode.
What
Ar Chron wrote:
Pito Salas wrote:
Here's an example:
class LineItem ActiveRecord::Base
belongs_to :order
end
class Order ActiveRecord::Base
has_many :line_items
end
my_line_item = LineItem.find(:zipcode = 12345)
Order.find_by_line_item(my_line_item) # doesn't work
Thank you for replying.
Yes. I can just create a view_3.html.erb and add a new definition for
view_3 as
def view_3
# some code
end
Is there no way to create all of them just by enter single line
command ? Maybe in Rails 4 :D ?
On Sep 4, 5:31 pm, Frederick Cheung
Probably not explaining this clearly enough (I blame the
distillery
masters at Lagavulin), but:
Wish I was there! Which of their Beer is available in the US?
Lol, Lagavulin is a famous WHISKY destillery
By the way, my_order.find_by_line_item fails with no such method, not
just by
my models
borrower- has_many :loans
loan -belongs_to :borrower
my loans _controller
def new
@borrower = Borrower.find(params[:borrower_id])
logger.debug ' @borrower.id'
logger.debug @borrower.id
@loan = Loan.new
respond_to do |format|
On 3 September 2010 18:21, Philip Hallstrom phi...@pjkh.com wrote:
It seems the guide at http://guides.rubyonrails.org/ has been updated
to 3.0. I am still using 2.3.5 with plans of upgrading. Any ideas on
how I can get the older guide?
http://guides.rubyonrails.org/v2.3.8/
It would help if
As I am sure you know the 'find_by*' methods are all dynamic. They are
based on the field/column name, not on the type of object the column
is supposed to reference (if any). AR will do the magic of finding the
ID value if you pass an object to the method but apparently it will
not be magic enough
I think one of the things you might need is a 'timer', which will let
your code 'sleep' before calling again your 'how_finished' function. I
have never done this but remember reading about it, I googled for
'javascript sleep timer' and one of the links I found was this:
On 4 September 2010 01:27, Pito Salas li...@ruby-forum.com wrote:
Here's an example:
class LineItem ActiveRecord::Base
belongs_to :order
end
class Order ActiveRecord::Base
has_many :line_items
end
my_line_item = LineItem.find(:zipcode = 12345)
Order.find_by_line_item(my_line_item)
Hello Guys,
I have a model Person with lots of columns (date, int, string, so on) and
right now I need to make a filter for my costumer.
My goal is something like this:
http://www.redmine.org/projects/redmine/issues.
Or, even better: http://trac.edgewall.org/demo-0.12/query.
The most
I'll see if I can help. Can you explain what you want to see happen
that's not? What do the logs tell us? If you're able to make this work
in some situations, compare the log output to a failed request and see
if the differences give us any clues.
Luke
On Sep 2, 10:55 pm, Rodrigo Dominguez
On Sep 3, 2010, at 7:27 PM, Philip Hallstrom wrote:
On Sep 3, 2010, at 3:44 PM, Cuz Ican wrote:
On Sep 3, 2010, at 6:00 AM, 侯健 wrote:
Hi,
Our team decided to use rails to develop our new web application
project. Some of our team members think we should ues rails 3 for
our new
Hallo,
I want to test the csrf protection of my application but forgery
protection is not working with jquery ajax request.
I have used Unobtrusive Javascript with jquery
I have removed the
%= csrf_meta_tag %
so that my application do not include authenticity token.
In my view I have the
What would be the best way in rails to store a single variable and have
it persist. Like a have a variable that says total_visits that counts
the total number of page loads.
The only solution I can think of is having a table with a single row.
--
Posted via http://www.ruby-forum.com/.
--
You
Hello,
I have added a comment form to my article show page, but after I submit
the comment, I get the following error: Couldn't find Article without an
ID.
I think it is because the Comments controller does not know which
article to add the new comment.
comments_controller:
def create
It would help to know the URL your being redirected to... but I see
one potential issue:
if @comment.save
flash[:success] = Comment saved.
redirect_to articles_path(@article)
else
render 'show'
end
Lets pretened your comment failed to save... your rendering show...
This is from the rails log:
SELECT district_sets.id FROM district_sets WHERE
(district_sets.ident = 'juris-60c8bcea56c0dfa02d121691e0e72152' AND
district_sets.id 12) LIMIT 1
I am confused by the operator. Can anyone clarify that for me please?
Thanks!
-- Pito
--
Posted via
IMHO The biggest problem with rails is the fact that it makes working
easy and fun as long as your work can follow the MVC system. If you
try to do it your way it won't be the rails way (at least as far as I
know).
If you want to track any more information other then number of pages
views, create
http://dev.mysql.com/doc/refman/5.0/en/non-typed-operators.html
not equals
On Sep 4, 2:06 pm, Pito Salas li...@ruby-forum.com wrote:
This is from the rails log:
SELECT district_sets.id FROM district_sets WHERE
(district_sets.ident = 'juris-60c8bcea56c0dfa02d121691e0e72152' AND
!=
--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to
I can verify this on ubuntu using those specs.
I installed rails 3 using ruby 1.9.2 and RVM. I suggest that as well.
http://rvm.beginrescueend.com/
There is a railscsts on rvm as well.
Brian
On Sep 4, 4:36 am, Dongsheng Wang li...@ruby-forum.com wrote:
I got the following error when try to
My first suspicion would be that you need the full path to rake
but no promises :)
On Sep 4, 5:36 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Sep 4, 5:38 am, boblu bobl...@gmail.com wrote: I want to use rake
background task in rails like this
system(cd #{Rails.root}
Hello all,
for some reason nothing is being inserted into the database. I have no
idea why not! Here is my action:
def create
@information = CalorieKing.new
@information = CalorieKing.get_information(params[:id])
@information = @information['food']['servings']
I had the same problem.
In mapping.rb of the plugin, add this function to class Variable
def to_str
@variable + ;
end
Appears to work fine after this fix.
Dave
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group,
Fernando Perez wrote:
!=
Thanks... The reason I didn't think that is what it meant (although I
believe you :) is that I saw it here:
[Development] ap j
#DistrictSet:0x105568550 {
:id = 3,
:display_name = ds2,
:created_at = Sat, 04 Sep 2010 11:21:36 PDT
On 4 September 2010 20:49, Pito Salas li...@ruby-forum.com wrote:
Fernando Perez wrote:
!=
Thanks... The reason I didn't think that is what it meant (although I
believe you :) is that I saw it here:
[Development] ap j
#DistrictSet:0x105568550 {
:id = 3,
I'm trying to pass a value from a cookie from the controller into model
by using attr_accessor. But it doesn't work and I suspect I do something
wrong.
Is this on the right path?
class Test ActiveRecord::Base
attr_accessor :key
key ..
end
class TestController ApplicationController
Hello everyone,
I'm trying to map a controller actions with the name as a action. I've
got it well:
match /home = main#home, :as = :home
match /contact = main#contact, :as = :contact
match /whoweare = main#whoweare, :as = :whoweare
But I want to do this with only one line of code. I've tried it
Is it possible to move the complete ROR install/development directory
or directories to new PC and continue to work/dev as the original one?
Are there any registry entries that would preclude this working on the
new PC?
Thanks!
--
You received this message because you are subscribed to the
On 4 Sep, 20:23, Zack Nathan li...@ruby-forum.com wrote:
Hello all,
for some reason nothing is being inserted into the database. I have no
idea why not! Here is my action:
Did you check for any validations failing
Fred
def create
@information = CalorieKing.new
@information =
Hi,
What do you guys use to definitely handle decimal numbers? This is
getting me crazy!
I use BigDecimal, but it craps out of the input number is something like
14,53, Rails transforms it as 14.0
Any solution?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
Do you understand what it means?
It's probably a validates_uniqueness_of that adds that additional query.
--
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
It should work. What makes you think it doesn't?
--
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-t...@googlegroups.com.
To unsubscribe from this
What do you guys use to definitely handle decimal numbers? This is
getting me crazy!
I use BigDecimal, but it craps out of the input number is something like
14,53, Rails transforms it as 14.0
Any solution?
Are you really using the comma in the data?
This IRB session suggests what might
for some reason nothing is being inserted into the database. I have no
idea why not! Here is my action:
The most common cause is that validations are failing, and you're just
not seeing that.
-- gw
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
I figured out the problem with the original post, but I have a new
problem.
When a user submits an invalid comment(if the title or content does not
validate correctly), they get sent back to the article. There are two
problems, though.
1. The form does not keep the previous field content, so
What would be the best way in rails to store a single variable and have
it persist. Like a have a variable that says total_visits that counts
the total number of page loads.
The only solution I can think of is having a table with a single row.
One answer would be yes, pretty much if you
You almost have it all correct, just in your view:
%= form_for([...@article, @comment]) do |f| %
--
http://digiprof.tv
--
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,
And your controller should be put on a diet...
--
http://digiprof.tv
--
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-t...@googlegroups.com.
To
It seems Rails does it a bit differently. Anyway I was able to find a
solution:
http://gem-session.com/2010/03/how-to-use-the-comma-as-decimal-separator-in-rails-activerecord-columns-and-text-fields
--
http://digiprof.tv
--
Posted via http://www.ruby-forum.com/.
--
You received this
and then rendering a partial of the login form on the 'new' action of
users. Am I in the right direction?
Yes, simply render a partial for registration on login page or
vice-versa.
See this example: http://suivauto.com/login
--
Posted via http://www.ruby-forum.com/.
--
You received this
Well, specifically what it would be for is an app which parses /
collects stats on twitter. I want to have a persistant of the ID
(twitter side) of the most recent parsed tweet, so I know where to start
at the next startup, or in case it gets interrupted.
I don't what to log every tweet I
Hi,
I have installed ruby 1.9.2, rubygems 1.3.7 and rails 3.0. created a
demo application. when I start 'rails server' I get:
'require': no such file to load -- sqlite3/sqlite3_native (LoadError)
any idea ?
Thank you.
Dani
--
Posted via http://www.ruby-forum.com/.
--
You received this
I forgot to say that I'm using Rails 3 and Ruby 1.9.2 .
--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to
change your question to
how can count the total number of page loads for ?
For what?
On 4 September 2010 13:26, Shea Barton li...@ruby-forum.com wrote:
What would be the best way in rails to store a single variable and have
it persist. Like a have a variable that says total_visits
I'm starting a new hobby. Going to learn about and have a try at
building some automated trading systems for forex and other markets.
So far I've been very disappointed with the results of my googling
looking for a broker and/or third-party product to use as a bridge
between the software I will
Hi!
I'm trying to develop a web chat (like the facebook one, but much
simpler) that works inside Rails 3, and so I'm inquiring about the
methods used for this scope. I had some success applying this guide
http://www.web2media.net/laktek/2010/02/16/building-real-time-web-apps-with-rails3/
, so now
57 matches
Mail list logo