Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Plugins
  1. OpenProject
  2. Forums
  3. Plugins
  4. Permit Custom Parameters Of Plugin

Permit Custom Parameters Of Plugin

Added by Sahil Sharma over 7 years ago

Hi,

I have created a new plugin for open project, and i am adding a partial view that have some new fields. In short i am trying to add new fields in project’s setting page in open project. And i wan to save those parameters to database.
Everything is working fine but i am not able to know how i can pass my custom new parameters from my partial view. so that i can add values from those params to db.

In open project there is a class PermitParams that have methods to permit parameters. But they are only permitting default parameters. I am not getting how i can i permit my new parameters.

I dont want make any changes in open project code. I want to do it with plugin. So that when user will install the plugin he dont have to make any changes and plugin can automatically add something to permit paramters.

Thanks.


Replies (1)

RE: Permit Custom Parameters Of Plugin - Added by Jens Ulferts over 7 years ago

If you stick to the preferred way of building the plugin around an engine based on acts_as_op_engine, you can rely on an API for adding parameters to the allowed parameter list.

If that doesn’t suffice, you can always fall back to the ruby best practice of monkey patching as is done in the backlogs plugin.

  • (1 - 1/1)
Loading...