Wszystko działało do momentu aż nie dodałam asocjacji.
kom.rb
class Kom < ActiveRecord::Base
belongs_to :user
attr_accessible :amount, :cost, :date_start, :text
end
user.rb
[code]class User < ActiveRecord::Base
has_many :koms, :dependent => :destroy
has_paper_trail
Include default devise modules. Others available are:
:token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :nip, :name, :street, :zip, :city
attr_accessible :title, :body
end[/code]
routes.rb
[code]Nostalgia::Application.routes.draw do
resources :koms do as_routes end
devise_for :admins, :users
devise_for :users
resources :welcome, :only => :index
resources :admins, :only => :index
resources :users
post “versions/:id/revert” => “versions#revert”, :as => “revert_version”
get “welcome/index”
root :to => ‘welcome#index’
match ‘:controller(/:action(/:id))(.:format)’
end[/code]
po kliknięciu “create new kom” wyskakuje błąd Request Failed (code 500, Internal Error) a w logach
ActionView::Template::Error (UsersController missing ActiveScaffold):
11: <div id ="<%= subform_div_id %>" <%= 'style="display: none;"'.html_safe if column.collapsed -%>>
12: <%# HACK to be able to delete all associated records %>
13: <%= hidden_field_tag "#{active_scaffold_input_options(column)[:name]}[0]", '' if column.plural_association? %>
14: <%= render :partial => subform_partial_for_column(column), :locals => {:column => column, :parent_record => parent_record, :associated => associated, :show_blank_record => show_blank_record} %>
15: </div>
16: <%= link_to_visibility_toggle(subform_div_id, {:default_visible => !column.collapsed}) -%>
17: <% @record = parent_record -%>
Pewnie jakiś głupi błąd, coś trzeba gdzieś dodać… ale jakbym mogła prosić o pomoc?