-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Controller yields error #8322
Comments
Happens only in production mode, development works fine |
Hello @hasandiwan and thank you for your interest for the project. Diaspora already has a built-in theme system, I think you should have a look there first it would be much easier to maintain. |
Would my model would be a series of <subnet_address. subnet_netmask, theme>
records then? -- H
…On Sat, 20 Nov 2021 at 01:39, Fla ***@***.***> wrote:
Hello @hasandiwan <https://github.com/hasandiwan> and thank you for your
interest for the project. Diaspora already has a built-in theme system, I
think you should have a look there first it would be much easier to
maintain.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8322 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKSFUTOH4FBLWCMBLLNC7JTUM5UG3ANCNFSM5INQQGWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
<http://bit.ly/hd1AppointmentRequest>*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
<http://bit.ly/hd1AppointmentRequest>*.
<https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1>Sent
from my mobile device
Envoye de mon portable
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to offer diaspora installations to clients, each with their own CSS to modify their look and feel. While I'm open to suggestions, the way I'm proposing doing so is by having a stylesheets model with the request CIDR, matched using ruby's ipaddr class -- https://ruby-doc.org/stdlib-2.5.1/libdoc/ipaddr/rdoc/IPAddr.html -- and then having the contents of the style tag. In my controller, I plan on having something like this:
def custom_stylesheet
if request_ip_address.subnet ~ /18.0.0.0:255.0.0.0/
return 'mit.css'
end
if request_ip_address.subnet ~ /128.113.0.0/255.255.0.0/
return 'rpi.css'
end
end
To store this info, I'm trying to create a new model/controller, when I try this, I am awarded with the following error:
Anyone have any idea or know an easier way to accomplish what I'm trying to do? Many thanks, in advance!
The text was updated successfully, but these errors were encountered: