Skip to content

Instantly share code, notes, and snippets.

View dlupu's full-sized avatar
🏠
Working from home

Dorian dlupu

🏠
Working from home
View GitHub Profile
@dlupu
dlupu / plugin.sh
Created December 30, 2019 18:51
Create rspec rails plugin
# http://stackoverflow.com/questions/8507798/rails-3-1-plugin-gem-dummy-test-app-rspec
# http://namick.tumblr.com/post/17663752365/how-to-create-a-gemified-plugin-with-rails-3-2-rspec
rails plugin new plugin_name --skip-test-unit --dummy-path=spec/dummy
cd plugin_name
# Add rspec-rails to gemspec dev deps
# s.add_development_dependency "rspec-rails"
bundle install
@dlupu
dlupu / application_controller.rb
Created October 5, 2020 20:05 — forked from sunny/application_controller.rb
Rails helper so that "?_locale_keys=1" in URL shows locale keys
class ApplicationController < ActionController::Base
include I18nHelper
end
@dlupu
dlupu / hotwire_stimulus_2_0.md
Last active March 31, 2025 05:57 — forked from scottharvey/stimulus.md
Hotwire Stimulus 2.0 cheatsheet (in the process of being updated). If you have any feedback, please comment.
@dlupu
dlupu / main.js
Created January 24, 2021 21:17
Storybook configuration that picks up Ruby on Rails webpacker packs
// .storybook/main.js
//
// this module makes the assumption that
// the local host is accessible at http://localhost:3001"
let fs = require('fs');
module.exports = {
stories: ['../spec/components/**/*.stories.json'],
addons: [