I apologize for my lack of Ruby on Rails knowledge, I've been reading the Agile Development book for the past few days. I'm now trying out an example here to list and display users:
http://wiki.developerforce.com/page/Accessing_Salesforce_Data_From_Ruby
The error I am receiving when navigating to http://localhost:3000/users is:
undefined method `sfdc_models_user_path' for #<#<Class:0x007fdcdefe6100>:0x007fdcdefd9b08>
I've successfully used the gem in a ruby console though.
Here is my code:
views/users/index.html.erb
<h1>Users</h1>
<% @users.each do |u| %>
<%= link_to "#{u.Name}", u %><br/>
<% end %>
views/users/show.html.erb
<h1>User <%= @user.Name %></h1>
<% @user.attributes.each do |a| %>
<%= a[0] %>: <%= a[1] %><br/>
<% end %>
controllers/users_controller.rb
class UsersController < ApplicationController
include Databasedotcom::Rails::Controller
def index
@users = User.all()[0..19]
end
def show
@user = User.find(params[:id])
end
end
And I added the following line to config/routes.rb
resources :users
Please help!
--
You received this message because you are subscribed to the Google Groups "ActiveSalesforce" group.
To view this discussion on the web visit https://groups.google.com/d/msg/activesalesforce/-/wB_YdaGKtY8J.
To post to this group, send email to activesa...@googlegroups.com.
To unsubscribe from this group, send email to activesalesfor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activesalesforce?hl=en.