Open ObserverHerb opened 7 years ago
I'd like to see this be able to fall back to the hard limit (40) when no limit is specified, i think if that can be done, this can be accepted. 👍
It already does. The condition in show.rb...
@limit = json_hash.key?("limit") ? json_hash["limit"] : 40
This pulls the limit key from the json if it exists, otherwise defaults to 40.
Whoops, my bad! Totally missed that when i skimmed over the code!
Added stability fix but that now puts the default in two different places as a literal, which will haunt us later.
Do you have a preferred place to set the default limit as a global constant? .env?
Generally, anything plugin-related we try to find a way to define in cinchize.yml. .env is usually a last resort location, but is where things should go if it doesn't make sense in cinchize.yml.
Any update on this? :)
Same as #76.
Possibly resolves #42.
shows.json can now contain a "limit" member that specifies a character limit for the specific show's title.
Changed hard limit in DataMapper class in suggestion.rb from 40 to the value of live show's limit. Not sure of workflow. May be a problem there is no live show in data.json? Also bumped setting LIVE_URL to immediately after call to Dotenv.load, otherwise it gets set too late to initialize the Suggestion class.