Displaying 20 results from an estimated 5000 matches similar to: "method value passing in rails"
2012 Apr 21
13
issues with changing directory structure in rails3
class BranchesController < ApplicationController
def branch
@branch = Branch.new (params[:branch])
branch_back = @branch.*branch*
end
end
in the model have one *branch.rb*
class Branch
def branch
end
end
In the view have one branches folder, also have the branch.html.erb in that
folder.
<%= form_for(@branch) do |f| %>
<%end%>
*routes.rb*
*
*
match
2012 May 08
2
issues with text_field in rails
*view*
<%= form_for(@mstype) do |f| %>
<p> <%= f.text_field(:Name,:class => "span1",:placeholder => "x") %>
<%end%>
*Got the error like this*
NoMethodError in Pgmdfntions#pgmdfntion
Showing *pgm.html.erb* where line *#57* raised:
undefined method `Name'' for #<Pgmdfntion:0xb457ad28>
But i could do this as same before. but in
2011 Oct 12
36
ROR setup on ubuntu machine
I am new to ROR, i need to setup ROR on my ubuntu machine. can u give some
steps to follow for ROR? or some effective tutorials link to setup this?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ciRx6txsgY4J.
To post to this group, send
2011 Jun 11
7
"Stack level too" deep with @controller.hi
Hi again, sorry for many questions. In mi HomeController, I have the
"hi" method, in this method I use an "if" for show a different message
for a registered user or a guest. When I call in "home/index" my
method "hi", show me this error message:
"Stack level too deep"
class HomeController < ApplicationController
def hi
if (current_user)
2010 Aug 21
4
No route matches?
Hi all,
I''m coming from the PHP world and I''m trying to learn Ruby and Rails.
I''m having a problem where I keep getting the error "No route matches /
home/view" even though I have it defined it. I''d appreciate any help
on this. I''m using rails 3.0 and the setting for the environment is
"development".
# routes.rb
2012 May 24
3
rails ajax issues
Hi
* *I think this is my 4 or 5th post about the ajax issues with my rails
code. But i couldn''t rectify my issues sofar.
problem is,
In my pages.html.erb have one text field and button. when i click on that
button, the text field value will get into the controller through ajax,so
after the function i need to get that value(textfield value) in same
page.
*page.html.erb*
2006 May 31
7
Getting 22 elements
Hello,
I''ve done
===
class HomeController < ApplicationController
def index
@country = Country.find(:all, :include => "cities")
end
end
===
And rhtml is:
===
<% @country.each do |country| %>
<h1><%= country.name %></h1>
<% country.cities.each do |city| %>
- <%= link_to city.name, :action =>
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such
column: books.user_id: SELECT "books".* FROM "books" WHERE
("books".user_id = 4)" ,which sounds like there is no user_id in books
table.So i just installed foreigner plugin and added "
t.integer :user_id, :null => false" and
"add_foreign_key(:books, :users)" in book
2012 May 16
7
Rails 3.1.0 cannot connect to sqlite database on Mac Lion
I''m running Rails 3.2.3 on Mac Lion with sqlite 3.7.7 and ruby 1.9.3p125. I need to back down rails to 3.1.0 for a project but when I do that a simple index page give me a
ActiveRecord::ConnectionNotEstablished
error.
Rails 3.2.3 works, 3.1.0 not. Any ideas?
Just to show you it''s nothing fancy....
Gem file is only:
source ''https://rubygems.org''
gem
2011 Feb 14
1
Curiosity in my production.log: */*
In my production.log, I usually see lines like this:
Processing by HomeController#index as HTML
But sometimes I see the line like this:
Processing by HomeController#index as */*
At first I thought perhaps those calls were made by a bot, but after
looking at it closer it looks as those they are generated by normal
users. I have no idea, first, how that line could have been generated,
and
2011 Nov 22
7
rake aborted with ruby on rails
when i run * rake db:create*
*
*
WARNING: ''require ''rake/rdoctask'''' is deprecated. Please use ''require
''rdoc/task'' (in RDoc 2.4.2+)'' instead.
at
/home/vishnu/.rvm/gems/ruby-1.8.7-p352-D9TI4Ms3gBgeRYYz77F+sQ@public.gmane.org/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
DEPRECATION WARNING: Rake tasks in
2006 Jun 22
2
MVC architecture
Hi,
I want to creat a GUI accessible via the web with ruby to interface some
matlab implementation ... so I extended Ruby with C++ and then matlab :)
that works perfectly: I have finaly a Ruby class I can call whenever I
want to lunch my matlab algorithm ;)
the point is now I have to make the GUI in HTML with Rubby on rails and
Damn! I don''t get how works the MVC architecture in Ruby
2009 Jun 23
7
can't get remote_function working on rails 2.3.2
I''ve tried moving the code around in different ways, but so far I
haven''t gotten remote_function to work for me (I''m using Rails 2.3.2 on
my Mac). I want to make an AJAX call when I double-click a word on my
page, and the Javascript function is being called when the ondblclick
event is fired, but nothing happens when it gets to my the "new
Ajax.Request" part
2013 Oct 27
5
run simple method from Helper on button click
Greetings,
I''m new to rails and currently having couple problems about how to add
javascript functionality into rails.
I have a simple method in the helper and i want to run this code on
button click.
------------------------------------------------------------------
module PagesHelper
def show_message
"simple output"
end
end
2012 Aug 28
4
ArgumentError in HomeController#index
Hey guys, I''m new to ruby/rails and trying to sort something...
I just created an app with composer,
http://railsapps.github.com/rails-composer/
I used the command:
rails new myapp -m
https://raw.github.com/RailsApps/rails-composer/master/composer.rb
I set up the rails server, and tried to load the app on localhost:3000
However, I end up with:
ArgumentError in HomeController#index
2010 Jun 21
4
Failing Routes in deployment
I have an app that has the following in the routes file:
namespace "admin" do
# ADMINISTRATIVE ROUTES ONLY
root :to => ''home#index''
resources :comments do
member do
get :approve
get :reject
end
end
resources :users do
member do
get :block
get :unblock
end
end
end
When browing to
2006 May 06
3
define the meaning of this error
hi,
i just have this error, can anyone tell me what it means and how i can
fix it thanks.
NameError in HomeController#index
uninitialized constant Student
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
This error occured while loading the following files:
student.rb
Request
Parameters: None
Show session dump
---
user: !ruby/object:User
attributes:
2011 May 07
11
changing routes.rb
Hi,
I''m a complete beginner and I just have a simple question:
How do I change lines in a file like routes.rb? I know the command type
(i.e type config\routes.rb) but that just shows it and doesn''t allow me
to change anything.
Thanks in advance
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
1998 May 21
1
R-beta: Problem instaling e1071
I was trying to install e1071 and the compilation failed. Can some of
you R gurus help me with this...
thanks
pedro
----
Installing package `e1071' ...
libs
gcc -g -fpic -I/usr/local/R/include -c pgm.c -o pgm.o
pgm.c:19: pgm.h: No such file or directory
make: *** [pgm.o] Error 1
cp: src-c/*.so: No such file or directory
R
DONE
-----
Pedro Vale Lima
Dep. Chemical Eng.
2008 Apr 19
1
Inverse transform after applying function in frequency domain?
Dear R-Help,
I wish to simulate a process so that it has certain properties in the
frequency domain. What I attempted was to generate a random time-series
signal, use spec-pgram(), apply a function in the frequency domain, and then
inverse transform back to the time-domain. This idea does not seem as
straight forward in practice as I anticipated.
e.g.
x<-ts(rnorm(1000, 0,1), frequency=256)