Dandelion is a fair source project. View the code on Github

Commits on Jul 11, 2025
f802b4c

🐛 Fix calculation for zero application fees

Removed redundant && application_fee_amount > 0 from if conditions. The previous condition caused calculations to fall into the else block when application_fee_amount was 0. This was incorrect as the else block is intended for cases where no application fee mechanism is present. The updated condition if application_fee_amount ensures that if an application fee exists (even if its value is zero), the fee-based calculation path is taken. The subsequent check application_fee_amount_money > 0 within the ternary operator then correctly yields Money.new(0, currency) when the fee amount is zero, preventing miscalculations and ensuring accurate revenue reporting.

Commits on Jul 08, 2025
3adab12

🎨 (Gemfile): Reorganize gem declarations for better categorization

Moves the crawler_detect gem from the "Everything else" section to the "Rack" section. This improves the logical grouping and readability of the Gemfile by placing related gems together.

97882de

🎨
➖
💡 Refactor Gemfile for clarity and remove matrix gem

Move maxmind-geoip2 to the main dependency list. Add comments to utility gems to explain their purpose. Remove matrix gem as it is no longer a required dependency.

Commits on Jul 07, 2025
7eaead9

🐛 (delayed_job_error_notifications.rb): Send full error string to Honeybadger context

The last_error is now passed directly to Honeybadger's context without splitting it by newlines. This ensures that the complete error message, including any multi-line details or backtraces, is preserved and sent for more comprehensive error reporting and debugging.

e531c54

♻️ Move Stripe webhook URL definition to respective models

Move the stripe_webhook_url method from the StripeWebhooks concern to the Gathering and Organisation models.

This removes conditional logic from the shared concern, making the webhook URL definition explicit within each model. It improves code clarity and adheres better to the Single Responsibility Principle.

c2dd4f6

🐛 (belongs_to_without_parent_validation): Validate in-memory parent

Add check for in-memory parent object before querying the database. This ensures validations pass for unsaved associated records, particularly with nested attributes, by recognizing objects present in memory. It also reduces unnecessary database queries.

42eeba3

♻️
🔥 Remove DandelionModel and inline Mongoid concerns

Removed the DandelionModel base class. Inlined Mongoid::Document, Mongoid::Timestamps, and BelongsToWithoutParentValidation modules directly into all models that previously inherited from it. This simplifies the model inheritance hierarchy, making each model's dependencies explicit and reducing an unnecessary layer of abstraction.

35084c3

🎨 (dandelion_model.rb): Automate Mongoid collection naming for subclasses

Remove self.abstract_class = true as it is not applicable to Mongoid. Implement an inherited hook to automatically set the MongoDB collection name for subclasses. This ensures that all models inheriting from DandelionModel will have their collection name derived from their class name, reducing boilerplate and enforcing a consistent naming convention.

d8820dd

🏗️ (dandelion_model.rb): Mark DandelionModel as an abstract class

Prevents direct instantiation of the base model. Ensures it serves solely as a parent for other models.

cbb0241

✨ (models): introduce DandelionModel as a base class for Mongoid models
✨ (models): introduce BelongsToWithoutParentValidation concern to skip parent validation
♻️ (models): refactor models to inherit from DandelionModel and use new belongs_to
⬆️ (Gemfile): update Mongoid gem to allow newer versions

Commits on Jul 06, 2025
bc212b6

♻️ perf(event_boost_bid): index event association for performance

Adding an index to the event_id field improves query performance when looking up EventBoostBid records by their associated event.

Commits on Jul 05, 2025
b9ccfd3

✨ (organisations/_events.erb): Make event pagination per_page configurable

The per_page option for event pagination now accepts a params[:per_page] value. This provides greater flexibility for users to control the number of events displayed on a page, overriding the default of 20.

Commits on Jul 03, 2025
292d2de

♻️ Refactor event feedback associations and view logic

Removes the direct 'activity_id' association from EventFeedback and related callbacks. EventFeedback is now implicitly linked to an Activity through its Event, simplifying the data model and reducing redundancy. This eliminates the need for manual 'activity_id' updates and ensures data consistency.

Also removes the 'unscoped: true' local variable from event feedback partials and the corresponding 'unscoped' check within the partial. The responsibility for providing scoped or unscoped feedback collections is now solely with the calling controller or model, simplifying view logic.

Commits on Jul 02, 2025
bce9fd4

🎨 (events): Use h4 for question headings

Change label tag to h4 for questions prefixed with '#'. This improves the semantic structure and visual hierarchy. Questions now appear as distinct headings, enhancing readability.

Commits on Jun 30, 2025
58f5180

💄 Improve feedback section headings and styling

Update feedback section headings to include the name of the activity or organisation. Remove card styling from the organisation feedback section.

This provides clearer context for users and standardizes the visual presentation of feedback across different views.

bcb60b3

🐛 (events/_block.erb): Prevent carousel text display without organization

The event.carousel_text is now only displayed if the @organisation variable is also present. This ensures that the carousel text, which is likely specific to an organization's context, is not rendered when an organization is not defined, preventing incorrect UI display.

Commits on Jun 29, 2025
c3e1beb

🐛 (event_feedbacks.erb): Fix syntax error with extraneous closing ERB tag

Commits on Jun 28, 2025
9da11f1

🛂 Add organization admin authorization for resource creation

Replaces generic sign-in requirement with specific admin check. Ensures only organization administrators can create activities and local groups for their respective organizations. Refactors organization variable to instance variable for use in authorization helper.

565db01

♻️ (controllers): Refactor organisation assignment for new resources

Assigns Organisation object directly to new Activity and LocalGroup instances. Adds validation for organisation_id parameter presence and ensures Organisation exists, returning 404 if not found.

This improves robustness by validating organisation_id presence and existence. It also uses a more object-oriented approach for associations, preventing errors from invalid or missing organisation_id values.

209398a

🔧 (honeybadger_init.rb): Exclude specific Mongoid validation error

Adds a condition to exclude 'Ticket type is not available as sales have ended' validation errors from Honeybadger reporting. This error represents expected business logic and reduces noise in error monitoring.