Topic: simply_restful plugin

I'm in the process of building a new app in rails, and I wanted to use the simply_restful plugin to make things a little simpler, but as my app will use swedish models and controllers, which pluralize differently than english, it seems I can't use the plugin? Or am I missing something? I get an error when I try to generate a model with the simply_restful plugin installed, when I remove it everything works.

The error message looks like:

$shell script/generate model Kalender
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing': uninitialized constant Mapper (NameError)
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing'
        from script/../config/../vendor/plugins/simply_restful/init.rb:6:in `load_plugin'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/initializer.rb:348:in `load_plugin'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/initializer.rb:348:in `load_plugin'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/initializer.rb:158:in `load_plugins'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/initializer.rb:158:in `load_plugins'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/initializer.rb:102:in `process'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/initializer.rb:42:in `run'
        from ./script/../config/../config/environment.rb:13
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/generate.rb:1
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
        from script/generate:3

I have added a rule in my enviroment.rb telling the Inflector that Kalender is uncountable.

Re: simply_restful plugin

I believe you need Edge Rails to work with the simply_restful plugin.

Railscasts - Free Ruby on Rails Screencasts

Re: simply_restful plugin

Aha.. I'll try that! Thanks!

Re: simply_restful plugin

Yeah simply_restful doesn't really work on 1.1

rake rails:freeze:edge

Should do the trick smile

vinnie - rails forum admin

Re: simply_restful plugin

Your app uses swedish models?  Are they doing the coding?  Maybe that's your problem. wink

Re: simply_restful plugin

Haha, I wish I had swedish models coding for me wink

The plugin works great with Edge Raila btw.