# Accepting arguments for method defined by add\_to\_class

**URL:** https://meta.discourse.org/t/accepting-arguments-for-method-defined-by-add-to-class/128184
**Category:** Development
**Created:** [September 10, 2019, 3:10pm UTC](https://meta.discourse.org/t/accepting-arguments-for-method-defined-by-add-to-class/128184 "2019-09-10T15:10:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [September 10, 2019, 3:15pm UTC](https://meta.discourse.org/t/accepting-arguments-for-method-defined-by-add-to-class/128184/2 "2019-09-10T15:15:44Z")

</div>

> [@Restrict themes to certain groups?](https://meta.discourse.org/t/restrict-themes-to-certain-groups/87868/6):
>
> As a starting point, you could have a look at how theme access is overridden for the [theme-creator.discourse.org](http://theme-creator.discourse.org) system: The allow\_theme? method is used in Discourse’s application controller here: As Sam said, what you want to do is possible, but it will require a fair amount of development work to get it working smoothly

This seems like what you’re looking for. Makes for a good example.

So, basically, you’ll have to make those params as params to the lambda itself.

---

_[View the full topic](https://meta.discourse.org/t/accepting-arguments-for-method-defined-by-add-to-class/128184)._
