using Plutus with my own forms

76 views
Skip to first unread message

r/ Wobben

unread,
Jun 9, 2016, 11:59:36 AM6/9/16
to plutus-gem
Hello,

Suppose I have a form where a user can enter a account name.
Normally I would use a create function which looks like this :

  def create @book = Book.new(book_params)
     if @book.save
           redirect_to :action => 'list'
    else
      render 'new'
    end


Where do  I have to put the :Plutus:Assets =   
so it work with this engine. 


 

mbulat

unread,
Jun 9, 2016, 2:14:16 PM6/9/16
to plutus-gem
Accounts are just a basic ActiveRecord objects like any other model in your app. You'll want to build forms the same way.

So in your create method, something like

@account = Plutus::Asset.new(account_params)


You can check out the rails guides for more help on forms:

r/ Wobben

unread,
Jun 9, 2016, 2:28:09 PM6/9/16
to plutus-gem
Thanks,

This is the part I could not figure out.



Op donderdag 9 juni 2016 20:14:16 UTC+2 schreef mbulat:
Reply all
Reply to author
Forward
0 new messages