seasonedcc / croods-rails Goto Github PK
View Code? Open in Web Editor NEWA framework for creating CRUDs in Rails APIs https://croods-rails.netlify.app
License: MIT License
A framework for creating CRUDs in Rails APIs https://croods-rails.netlify.app
License: MIT License
add_action :some-action
will break because camelize
converts it to Some-action
instead of a class name. Expected: SomeAction
Croods does a lot of authorization by default, we need to make that explicit in Readme.
I'm registering this issue after trying - and failing - to better explain what user_is_not_the_owner?
does to @giovanisleite.
It's very common to need to return either a resource or list of resources that belong to curret_user, like:
current_user.offers.order(created_at: desc).first
current_user.saved_companies
current_user.reviews
These endpoints don't require an user_id
since we're using the session to identify the owner.
We could apply this pattern to index, show, create and update endpoints, at least.
Found on TCC:
Resulting SQL for #index:
"SELECT "messages".* FROM "messages" INNER JOIN "offers_diamonds" ON "offers_diamonds"."id" = "messages"."offers_diamond_id" INNER JOIN "offers" ON "offers"."id" = "offers_diamonds"."offer_id" WHERE "offers"."user_id" = 48 AND "messages"."offer_id" = 41 ORDER BY "messages"."created_at" DESC"
add resource generator that with a command generates necessary files and folders for the resource something like the Rails generator: rails g ***
Our new-rails-api and all our projects still uses Rails 5.
Will this gem be compatible?
Are the usual gems - devise, etc - already prepared to work with Rails 6?
When using an updated endpoint sending only a custom example of an attribute: Resource Offer with name
and status
.
I add an attribute to the request:
request do
add_attribute :change_status, :string, null: true
end
If only change_status
is sent in the request I get the error below:
Failure/Error: super(*json_args(*args))
ActionController::ParameterMissing:
param is missing or the value is empty: offer
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.