Using a gem / plugin

Hey guys,

I just started using Rails and Ruby this week. I come from PHP and I LOVE RAILS. It is so clean and fresh :slight_smile:

I wanted to create a very simple that has no database representation ... I found several active_form approaches. My problem is to use those classes after installing them, maybe that is a real newbie quetsion :slight_smile: So what I did:

$ rails plugin install https://github.com/remvee/active_form.git

Do I have to do anything else after that in order to have that plugin available in may code? Because I get the error: "uninitialized constant ActiveForm"

#app/controllers/register.rb

class Register < ActiveForm   def index     @register_form = Register.new   end end

#app/models/register.rb

class Register < ActiveForm

end

Thank you so much in advance, Philipp

Hey guys,

I just started using Rails and Ruby this week. I come from PHP and I LOVE RAILS. It is so clean and fresh :slight_smile:

I wanted to create a very simple that has no database representation ... I found several active_form approaches. My problem is to use those classes after installing them, maybe that is a real newbie quetsion :slight_smile: So what I did:

$ rails plugin install GitHub - remvee/active_form: ActiveRecord without persistance Plugin for Rails

Do I have to do anything else after that in order to have that plugin available in may code? Because I get the error: "uninitialized constant ActiveForm"

Which operating system and you using and which version of Rails? I don't know about active_form myself but assuming you are using Rails 3 then you should not need to install it as a plugin, you should just be able to include it in Gemfile (in your application) specifying the source, and run bundle install which should install it.

Colin