I've been using Hobo for quite a while, and I've just
upgraded to 2.0.0.pre5.
Generating a new app, I created a resource, fired up the
server and tried to create a new object. Everything worked
without a problem, except... no form fields!
I've check the rapid form for the object, and it holds the correct
fields, the database has the right schema, just no fields being
generated for the form. I'm stumped.
If anyone can give me a clue, there is a pint in London waiting
for them.
Here. is the model.
class Channel < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
name :string, :required
description :text
password :string
timestamps
end
# belongs_to :owner, :class_name => "User", :creator=>true
# has_many :users, :through=>:attendances
#Removed to try to debug this problem.
# --- Permissions --- #
def create_permitted?
acting_user.administrator?
end
def update_permitted?
acting_user.administrator?
end
def destroy_permitted?
acting_user.administrator?
end
def view_permitted?(field)
true
end
end
here is the auto generated form...
<def tag="form" for="Channel">
<form merge param="default">
<error-messages param/>
<field-list fields="name, description, password" param/>
<div param="actions">
<submit label="#{ht 'channel.actions.save', :default=>['Save']}" param/><or-cancel param="cancel"/>
</div>
</form>
</def>
and lastly here is my Gemfile
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
gem 'sqlite3'
gem 'thin'
gem 'therubyracer'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
gem "hobo", "= 2.0.0.pre5"
gem "rspec-rails", ">= 2.5.0", :group => [:test, :development]
gem "factory_girl", :group => :test
# Hobo has a lot of assets. Stop cluttering the log in development mode.
gem "quiet_assets", :group => :development
# Hobo's version of will_paginate is required.
gem "hobo_bootstrap", "2.0.0.pre5"
gem "jquery-ui-themes", "~> 0.0.4"
gem "hobo_clean_admin", "2.0.0.pre5"