Displaying 20 results from an estimated 20000 matches similar to: "Find a record in a find array"
2012 Jan 31
4
Connect with MySql and Ruby
Hi everybody,
I am very new in Ruby on Rails.
I install ruby(1.9.2p180) and Rails(3.1.3). Also I install RubyMine3.1.1
as IDE.
I successfully have done some simple simple practices. Now I want to
play with database(mysql).Though I have checked so some of the URLs but
unable to make out.
Please help me how to do that, what files or folders should I place
and where should I place those.
2012 Apr 10
6
User Association
Please Im trying to create an application where i can post like twitter,
but i was the users name to be posted under their respective posts
My Post_controller looks like this
def index
@posts = Post.all(:order => "created_at DESC")
@users = User.find(:all)
#@user_id = current_user.find(params[:id])
respond_to do |format|
format.html
end
end
def create
2011 Nov 05
13
Adding a site admin user while creating a site
Hi Gurus,
I wanted to add siteadmin user(basically a user with a certain role) while
creating the site itself. I hope that i have done all the necessary stuff
by going through raynb''s railscasts (
http://railscasts.com/episodes/196-nested-model-form-part-1) But could not
see user fields being displayed in the site creation form.. Below are the
details.
I Have two model users and
2011 Oct 26
6
Add an index to a form
Hello,
I''m having some trouble with forms, my app allows to enter data by
using a multi-step form that has 7 steps.
There are 3 steps that may let the user to add 1 form, for example
there''s a step called "children"
and that children has the following fields:
* name
* age
* gender
but one father may have more than 1 child and I''m adding another form
with
2012 Jan 24
4
:locals does not pass var in rails 3.1.0 partial view
Here is code in form.html.erb for partial view. Local var :sid was
defined as the id of the record and it should be passed into the
partial view standards.html.erb as a local var.
<% @rfq.standards.each do |r| %>
<p><%= render :partial => ''standards'', :locals => { :f =>
f, :sid => r.id } %></p>
<% end %>
Here is the
2010 Dec 05
14
Remove bundler
Can you remove bundler without any problem – for rails?
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2012 Feb 28
8
getting error:undefined method 'current'
hi all,
i am getting an error ''undefined method ''current'' for 852:Fixnum'', the
error coming for following line
<%if @expert_pagination.current.previous%>
<a href="#" class="darkgray1"
2011 Sep 18
9
Rails 3 and postgresql
I have a simple project created around a very, very simple database: one
main table packs with just three rows
Column | Type |
Modifiers
--------+-----------------------------+----------------------------------------------------
id | integer | not null default
nextval(''packs_id_seq''::regclass)
nombre | character
2012 Jan 17
4
Find all association methods
Hi all,
I want to get all association methods in one single model....
Any default method is provided by Active Record ???
i am using ruby 1.9.3 and rails 3.1.3
Please reply me ....
Thanks,
kingston.s
--
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
2012 Mar 27
10
`autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes
I have installed
ruby 1.9.2p318 (2012-02-14 revision 34678) [i686-linux]
rails 3.2.2
gem 1.8.21
on ubuntu 10.04
when i created my first application and tried running it on server I
get the following error not sure how to proceed further....
/home/fakirbaba/.rvm/gems/ruby-1.9.2-p318/gems/execjs-1.3.0/lib/execjs/
runtimes.rb:50:in `autodetect'': Could not find a JavaScript runtime.
See
2011 Nov 12
3
complex form with dynamic fields.
I''ve seen http://railscasts.com/episodes/73-complex-forms-part-1,
part2 and part3.
It seems to be my case.
I have:
Company
has_many :documents
has_many :tenders, :through..........
and
Document
belongs_to :company
Tender
has_many :companies, :through..........
I want to insert documents and tenerds on company creation.
If documents are more than one the user can click "add
2012 Feb 08
3
An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
error information occurred when I execute "rails new demo1 --
database=mysql"
MY environment below:
Mac OS 10.4.11,
Ruby 1.8.7
Rails 3.2.1,
Gem 1.8.15
mysql5 Ver 14.14 Distrib 5.1.61, for apple-darwin8.11.1 (i386) using
readline 6.2
mysql (2.8.1)
Please help me, thx!
more detail message as follows:
Installing mysql2 (0.3.11) with native extensions
2011 Nov 26
3
Asset pipeline giving me hard time. Please help !!! - (rails 3.1.3)
I am using rails 3.1.3.
Inside config/ application -> config.assets.enabled = true
Inside development.rb -> config.assets.compress = false
Inside production.rb -> config.serve_static_assets = false;
config.assets.compile = false
I have images placed in assets/images. If i do localhost:3000/assets/
image I get the image in the browser, but
unfortunately, on the browser i am
2012 Mar 17
8
Agile web development with rails 4th edition adding sizes to the product
Hi I am going through the Agile web development with rails 4th edition
book and I am trying to modify the depot application to allow the
customer to select a size before purchasing a product. What and how
would I have to modify the depot app to do this?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2012 Jan 08
1
Advanced has_many and belongs_to model joins ?
Hi,
I''m having major trouble with a somewhat self-referencing has_many and
belongs_to set of models.
item.manufacturer correctly returns an object of type Vendor. However,
item.manufacturer.name raises an exception even though the name value
is set correctly.
I''ve been debugging and googling and responding to stack overflow
peeps but still to no avail.
Complete details here:
2011 Dec 14
7
Actionmailer woes
hi Guys
I have now spent hours on this and turn to you in desperation.
I am using Actionmailer to fetch emails, but I need to pass a userid to
the receive method, so that the receive method knows what user to pass
the email to. I tried:
(ATTEMPT 1)
class PokeMailer < ActionMailer::Base
def receive(email,userid)
...
end
I then invoke the receipt of email with
task =
2011 Sep 21
5
problem with submit button in rails 3
hi,
i am using <%= s.submit ''Product save'' %>
when i click it, following error appears
" Routing Error
uninitialized constant ProductsController"
could any one provide me solution ?
thanks,
-pab
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send
2011 Oct 17
1
problem with auto increment in rails 3
hi,
i am tried to use auto increment field for user_id field but it
fails to do it
create_table :users,:id => false,:primary_key => ''user_id'', :force
=> true do |t|
t.integer :user_id,:auto_increment => true, :null => false
t.string :name
t.string :email
t.timestamps
end
is there any syntax to do auto increment in rails
2012 Apr 14
7
undefined method `model_name' for NilClass:Class
Hi guys,
I just started using Ruby on Rails. After implementing the RoR blog
tutorial I started with my own data model.
Sadly I am not able to get my create page running.
Model:
class Activity < ActiveRecord::Base
validates :activity, :presence => true
validates :forKids, :presence => true
validates :start_date, :presence => true
end
Controller:
class ActivitiesController <
2011 Jul 27
20
Rails, jquery and Ajax
How do I make an ajax call and then update a div with a partial? I''ve
tried this but it''s not working. Comment is created but the partial is
not loaded.
//view
<a href="#" id="testlink">Testlink</a>
<div id="commentlist">
</div>
//controller
def new
@comment = Comment.new
@comment.save