I am writing a migration:
migration 1, :create_accounts do
up do
create_table :accounts do
:wcd_guid
column :wcd_guid, String, :length = 32, :primary_key = true
column :id, String, :length = 32, :not_null = true
end
end
down do
drop_table :accounts
end
end
it does not make wcd_guid a primary key,
Hi,
I have a problem getting the user’s name property. What am I doing wrong?
I’m going insane why it’s not getting the name:
NoMethodError at /sican/feed
undefined method `name' for #Enumerator: User:find(sican)
Here’s the get method (commented out are some other alternatives that I’ve
Give this a try:
get '/:nickname/feed' do
user = User.first(:nickname = params[:nickname])
if user
@user_name = user.name
else
not_found 'unknown user'
end
end
On Friday, January 18, 2013 12:55:25 PM UTC-6, Alex wrote:
Hi,
I have a problem getting the user’s name property.
Thanks Abe, works great!
--
You received this message because you are subscribed to the Google Groups
DataMapper group.
To view this discussion on the web visit
https://groups.google.com/d/msg/datamapper/-/05B2ZIb4T3UJ.
To post to this group, send email to datamapper@googlegroups.com.
To