Try
rake routes
- and you will see, there really isn't defined a student_acounts_path
Try:
resources :students do
resources :accounts
end
or alternatively in your show (if you want to add a show, edit or
update-action in your accounts_controller without an :id param)
form_for [@student,
I keep getting the following error:
NoMethodError in Students#show
undefined method `student_accounts_path' for
#<#Class:0x007ffe2bf6d688>:0x007ffe2c5e5628>
I am trying to implement a has_one model. I followed the rails guide
that used the :post has_many :comments example and tweaked it a bit.
my
On Sat, Mar 31, 2012 at 5:25 PM, Alex Mercer wrote:
> gem update --system
Actually, that might not work on a Debian based distro if rubygems has
been installed via apt packages.
That's why I asked how Ruby was installed.
--
Leonardo Mateo.
There's no place like ~
--
You received this message
On Sat, Mar 31, 2012 at 10:28 PM, jenna_s wrote:
> Hi,
>
> I'm having trouble with a simple users-messages setup, where users can
> send messages to other users. Here's my class definition:
>
> class Message < ActiveRecord::Base
> belongs_to :from_user, :class_name => 'User'
> belongs_to :to_use
Hi,
I'm having trouble with a simple users-messages setup, where users can
send messages to other users. Here's my class definition:
class Message < ActiveRecord::Base
belongs_to :from_user, :class_name => 'User'
belongs_to :to_user, :class_name => 'User'
end
class User < ActiveRecord::Base
gem update --system
On Saturday, March 31, 2012 6:00:19 AM UTC+3, Ruby-Forum.com User wrote:
>
> I'm trying to install Ruby on Rails on Ubuntu 11.10, but receiving this
> error:
>
> $ sudo gem install rails
> ERROR: While executing gem ... (Gem::DependencyError)
> Unable to resolv
hi im new ruby on rails development currently im working with a
reservation system to start learning but im currently having a problem
with controllers and view
first i listed all the menu that the guest added inside the package that
he also added i listed them with this
_menuadded.html.erb
"Zoltán Iklódi" wrote in post #1054400:
> Hello,
>
> I want to add a Partner property to more than one type of models (ie.
> SalesOrder and PurchaseOrder).
> Is this the proper way of defining associatons or there's a simpler
> way?
What you need here is a polymorphic association. See:
http://gu
On Sat, Mar 31, 2012 at 7:59 PM, Linus Pettersson
wrote:
> Hi!
>
> I'm creating a simple signup form where people can sign up for a camp. They
> should be able to add a contact person and also sign up other people (such
> as family members).
>
> Two models:
> Application
> has_many :participants
Hi!
I'm creating a simple signup form where people can sign up for a camp. They
should be able to add a contact person and also sign up other people (such
as family members).
Two models:
Application
has_many :participants
accepts_nested_attributes_for :participants
Participant
belongs_to
Hi all,
I am a brand new user here so please accept my apologies if this has
already been covered.
I have searched extensively for the problem I'm having but cannot find a
solution. Also, I am very new to Ruby on Rails. I played around with RoR
back in 2008 but never fully got into it.
I h
Hello,
I want to add a Partner property to more than one type of models (ie.
SalesOrder and PurchaseOrder).
Is this the proper way of defining associatons or there's a simpler
way?
class Partner < ActiveRecord::Base
has_many :sales_orders
has_many :purchase_orders
end
class SalesOrder < Acti
I tried out some code in my console and I am having difficulty
translating it for my view and controller so that it gives me the same
result.
My console:
@contract = Contract.new(authnum: "900700", st_date:"2012-01-01",
end_date: "2012-30-06")
@contract.save
@code = Co
Hello,
I want to use HTTP streaming (Rails 3.2.2) to reduce my load time and
have tried it successfully, but it doesn't work with I18n.t – the
strings are not translated. Don't know why, I guess the relevant code
is not loaded at this time. Is there a tutorial / known best way to do
I18n with HTTP
I love Cloud based IDEs and really waiting for one which is especially
for Rails with RSpec and hopefully with Cucumber integrated well, as
well as RVM. Instant Heroku and Capistrano deployment would be great,
also SCSS or LESS integration. Thanks for interest,
YogiZoli
On Mar 30, 6:26 pm, "Simon
Hi,
I'm trying to execute some javascript in the browser after completing
my create action in the controller. Here's how I'm doing it:
In my controller:
def create
# exectue some code
js = render_to_string(:layout => false, :template =>
"planned_meals/meal.js.coffee.erb")
render :js
My apologies Walter, et al.
I haven't had access to my computers within the last 24 hrs. I shall
look into your recommendations tonight.
As always, thank you for your assistance and prompt replies.
~Kal
On Mar 30, 9:26 am, Walter Lee Davis wrote:
> On Mar 30, 2012, at 12:34 AM, Kal wrote:
>
On 29 March 2012 17:17, bingo bob wrote:
> Schema attached..
>
> model summaries...
>
> class Name < ActiveRecord::Base
>
> attr_accessible :given, :gender, :position
>
> has_many :user_names
> has_many :users, :through => :user_names
>
>
> class UserNames < ActiveRecord::Base
> belongs_to :us
Ok this might sound funny but , this problem is usually caused by lack
of javascript libraries in your rails setup so i would recommend you to
do this .
Install this gem and you should be ready to go
gem install therubyracer
If it works or it doesnt work let me know
--
Posted via http://www.
Hi
I've tried this on a virgin Rails 3.2.2 app. If you put the translations
for country names in the locale file using the 2 letter ISO code, it
looks something like this:
en:
countries:
DE: "Germany"
NO: "Norway"
US: "USA"
This works fine - but for Norway :-)
I18n.t :'countries.D
20 matches
Mail list logo